diff --git a/lisp/editorconfig.el b/lisp/editorconfig.el index 8d239229dcb..c21e12559a6 100644 --- a/lisp/editorconfig.el +++ b/lisp/editorconfig.el @@ -283,14 +283,11 @@ If set, enable that mode when `trim_trailing_whitespace` is set to true. Otherwise, use `delete-trailing-whitespace'." :type 'symbol) -(defvar editorconfig-properties-hash nil +(defvar-local editorconfig-properties-hash nil "Hash object of EditorConfig properties that was enabled for current buffer. Set by `editorconfig-apply' and nil if that is not invoked in current buffer yet.") -(make-variable-buffer-local 'editorconfig-properties-hash) -(put 'editorconfig-properties-hash - 'permanent-local - t) +(put 'editorconfig-properties-hash 'permanent-local t) (defvar editorconfig-lisp-use-default-indent nil "Selectively ignore the value of indent_size for Lisp files. @@ -464,9 +461,7 @@ heuristic for those modes not found there." (defvar-local editorconfig--apply-coding-system-currently nil "Used internally.") -(put 'editorconfig--apply-coding-system-currently - 'permanent-local - t) +(put 'editorconfig--apply-coding-system-currently 'permanent-local t) (defun editorconfig-merge-coding-systems (end-of-line charset) "Return merged coding system symbol of END-OF-LINE and CHARSET." diff --git a/lisp/emacs-lisp/comp-run.el b/lisp/emacs-lisp/comp-run.el index a659d7f68b7..3c7802c2ee0 100644 --- a/lisp/emacs-lisp/comp-run.el +++ b/lisp/emacs-lisp/comp-run.el @@ -186,8 +186,7 @@ processes from `comp-async-compilations'" (max 1 (/ (num-processors) 2)))) native-comp-async-jobs-number)) -(defvar comp-last-scanned-async-output nil) -(make-variable-buffer-local 'comp-last-scanned-async-output) +(defvar-local comp-last-scanned-async-output nil) ;; From warnings.el (defvar warning-suppress-types) (defun comp--accept-and-process-async-output (process) diff --git a/lisp/info-look.el b/lisp/info-look.el index 2baf133c7d3..ea35540d5c0 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el @@ -46,11 +46,10 @@ "Major mode sensitive help agent." :group 'help :group 'languages) -(defvar info-lookup-mode nil +(defvar-local info-lookup-mode nil "Symbol of the current buffer's help mode. Help is provided according to the buffer's major mode if value is nil. Automatically becomes buffer local when set in any fashion.") -(make-variable-buffer-local 'info-lookup-mode) (defcustom info-lookup-other-window-flag t "Non-nil means pop up the Info buffer in another window." diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el index c90537f1502..7cbcf9f1c0f 100644 --- a/lisp/mh-e/mh-folder.el +++ b/lisp/mh-e/mh-folder.el @@ -454,11 +454,10 @@ FACE is the font-lock face used to display the matching scan lines." (let ((cache (intern (format "mh-folder-%s-seq-cache" prefix))) (func (intern (format "mh-folder-font-lock-%s" prefix)))) `(progn - (defvar ,cache nil + (defvar-local ,cache nil "Internal cache variable used for font-lock in MH-E. Should only be non-nil through font-lock stepping, and nil once font-lock is done highlighting.") - (make-variable-buffer-local ',cache) (defun ,func (limit) "Return unseen message lines to font-lock between point and LIMIT." diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 806010624b2..0a8d2d4cb2c 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -853,11 +853,9 @@ filename part, though.") "Buffer name for a temporary buffer. It shall be used in combination with `generate-new-buffer-name'.") -(defvar tramp-temp-buffer-file-name nil +(defvar-local tramp-temp-buffer-file-name nil "File name of a persistent local temporary file. Useful for \"rsync\" like methods.") - -(make-variable-buffer-local 'tramp-temp-buffer-file-name) (put 'tramp-temp-buffer-file-name 'permanent-local t) (defcustom tramp-syntax 'default diff --git a/lisp/obsolete/iswitchb.el b/lisp/obsolete/iswitchb.el index e1ea9141f0d..abd5005e54d 100644 --- a/lisp/obsolete/iswitchb.el +++ b/lisp/obsolete/iswitchb.el @@ -410,10 +410,9 @@ Its value is one of `samewindow', `otherwindow', `display', `otherframe', `maybe-frame' or `always-frame'. See `iswitchb-default-method' for details of values.") -(defvar iswitchb-eoinput 1 +(defvar-local iswitchb-eoinput 1 "Point where minibuffer input ends and completion info begins. Copied from `icomplete-eoinput'.") -(make-variable-buffer-local 'iswitchb-eoinput) (defvar iswitchb-buflist nil "Stores the current list of buffers that will be searched through. diff --git a/lisp/obsolete/longlines.el b/lisp/obsolete/longlines.el index f065bcaff26..3cfde4cb298 100644 --- a/lisp/obsolete/longlines.el +++ b/lisp/obsolete/longlines.el @@ -80,17 +80,11 @@ This is used when `longlines-show-hard-newlines' is on." ;;; Internal variables -(defvar longlines-wrap-beg nil) -(defvar longlines-wrap-end nil) -(defvar longlines-wrap-point nil) -(defvar longlines-showing nil) -(defvar longlines-decoded nil) - -(make-variable-buffer-local 'longlines-wrap-beg) -(make-variable-buffer-local 'longlines-wrap-end) -(make-variable-buffer-local 'longlines-wrap-point) -(make-variable-buffer-local 'longlines-showing) -(make-variable-buffer-local 'longlines-decoded) +(defvar-local longlines-wrap-beg nil) +(defvar-local longlines-wrap-end nil) +(defvar-local longlines-wrap-point nil) +(defvar-local longlines-showing nil) +(defvar-local longlines-decoded nil) ;;; Mode diff --git a/lisp/obsolete/tpu-edt.el b/lisp/obsolete/tpu-edt.el index 62431662baa..4447a8d1001 100644 --- a/lisp/obsolete/tpu-edt.el +++ b/lisp/obsolete/tpu-edt.el @@ -604,21 +604,17 @@ GOLD is the ASCII 7-bit escape sequence OP.") ;;; ;;; Buffer Local Variables ;;; -(defvar tpu-newline-and-indent-p nil +(defvar-local tpu-newline-and-indent-p nil "If non-nil, Return produces a newline and indents.") -(make-variable-buffer-local 'tpu-newline-and-indent-p) -(defvar tpu-newline-and-indent-string nil +(defvar-local tpu-newline-and-indent-string nil "Mode line string to identify AutoIndent mode.") -(make-variable-buffer-local 'tpu-newline-and-indent-string) -(defvar tpu-saved-delete-func nil +(defvar-local tpu-saved-delete-func nil "Saved value of the delete key.") -(make-variable-buffer-local 'tpu-saved-delete-func) -(defvar tpu-buffer-local-map nil +(defvar-local tpu-buffer-local-map nil "TPU-edt buffer local key map.") -(make-variable-buffer-local 'tpu-buffer-local-map) ;;; @@ -631,8 +627,7 @@ GOLD is the ASCII 7-bit escape sequence OP.") ;;; (defvar tpu-original-mm-alist minor-mode-alist) -(defvar tpu-mark-flag "") -(make-variable-buffer-local 'tpu-mark-flag) +(defvar-local tpu-mark-flag "") (defun tpu-set-mode-line (for-tpu) "Set `minor-mode-alist' for TPU-edt, or reset it to default Emacs." diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index d4a213466f3..a9fb3e3de6a 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -5574,10 +5574,8 @@ def __FFAP_get_module_path(objstr): "Buffer name used for check commands." :type 'string) -(defvar python-check-custom-command nil +(defvar-local python-check-custom-command nil "Internal use.") -;; XXX: Avoid `defvar-local' for compat with Emacs<24.3 -(make-variable-buffer-local 'python-check-custom-command) (defun python-check (command) "Check a Python file (default current buffer's file). diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index efe38337001..165afd5a746 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el @@ -273,8 +273,7 @@ on the menu bar. (defvar reftex-multifile-index 0) ;; Variable holding the symbol with the label list of the document. -(defvar reftex-docstruct-symbol nil) -(make-variable-buffer-local 'reftex-docstruct-symbol) +(defvar-local reftex-docstruct-symbol nil) (defun reftex-next-multifile-index () ;; Return the next free index for multifile symbols. @@ -2116,8 +2115,7 @@ IGNORE-WORDS List of words which should be removed from the string." ;; Define a menu for the menu bar if Emacs is running under X -(defvar reftex-isearch-minor-mode nil) -(make-variable-buffer-local 'reftex-isearch-minor-mode) +(defvar-local reftex-isearch-minor-mode nil) (easy-menu-define reftex-mode-menu reftex-mode-map "Menu used in RefTeX mode."