Fix formatting ignoring buffer-local variables

This commit is contained in:
Nathan Tran 2021-07-24 01:54:06 +10:00 committed by GitHub
parent 46732c0ada
commit ad24061a81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,7 +164,7 @@ See `+format/buffer' for the interactive version of this function, and
;; buffer as possible, in case the formatter is an elisp ;; buffer as possible, in case the formatter is an elisp
;; function, like `gofmt'. ;; function, like `gofmt'.
(cl-loop for (var . val) (cl-loop for (var . val)
in (cl-remove-if-not #'listp (buffer-local-variables (current-buffer))) in (cl-remove-if-not #'listp (buffer-local-variables origin-buffer))
;; Making enable-multibyte-characters buffer-local ;; Making enable-multibyte-characters buffer-local
;; causes an error. ;; causes an error.
unless (eq var 'enable-multibyte-characters) unless (eq var 'enable-multibyte-characters)