diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-01-31 19:46:20 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-01-31 20:08:25 +0100 |
commit | 58473dc6608fcfb1ce66e8f540bd804a70813246 (patch) | |
tree | 8b7c7cbc603f12fefd00e0137772737aa88cf3dd /lisp/bindings.el | |
parent | 2c754cf449e97203187556390d2c219a50f7c950 (diff) | |
download | emacs-58473dc6608fcfb1ce66e8f540bd804a70813246.tar.gz |
Prefer defvar-local in preloaded files
* lisp/abbrev.el:
* lisp/bindings.el (mode-line-mule-info, mode-line-modified)
(mode-line-remote, mode-line-process)
(mode-line-buffer-identification):
* lisp/buff-menu.el (Buffer-menu-files-only):
* lisp/files.el (buffer-file-number, buffer-file-read-only)
(local-write-file-hooks, write-contents-functions)
(file-local-variables-alist, dir-local-variables-alist)
(save-buffer-coding-system, buffer-save-without-query):
* lisp/font-core.el (font-lock-defaults):
* lisp/font-lock.el (font-lock-keywords-case-fold-search)
(font-lock-syntactically-fontified)
(font-lock-extend-after-change-region-function)
(font-lock-extend-region-functions, font-lock-major-mode):
* lisp/menu-bar.el (list-buffers-directory):
* lisp/simple.el (next-error--message-highlight-overlay)
(next-error-buffer, next-error-function)
(next-error-move-function, goto-line-history)
(minibuffer-default-add-done, undo-extra-outer-limit):
* lisp/tab-bar.el (tab-switcher-column):
* lisp/term/ns-win.el (ns-select-overlay):
* lisp/window.el (window-size-fixed, window-area-factor)
(window-group-start-function, window-group-end-function)
(set-window-group-start-function)
(recenter-window-group-function)
(pos-visible-in-window-group-p-function)
(selected-window-group-function)
(move-to-window-group-line-function): Prefer defvar-local.
Diffstat (limited to 'lisp/bindings.el')
-rw-r--r-- | lisp/bindings.el | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lisp/bindings.el b/lisp/bindings.el index 187444af664..43b62f9bbfc 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -199,7 +199,7 @@ mouse-3: Set coding system" (symbol-name buffer-file-coding-system)) "Buffer coding system: none specified"))) -(defvar mode-line-mule-info +(defvar-local mode-line-mule-info `("" (current-input-method (:propertize ("" current-input-method-title) @@ -225,7 +225,6 @@ mnemonics of the following coding systems: coding system for terminal output (on a text terminal)") ;;;###autoload (put 'mode-line-mule-info 'risky-local-variable t) -(make-variable-buffer-local 'mode-line-mule-info) (defvar mode-line-client `("" @@ -247,7 +246,7 @@ mnemonics of the following coding systems: (format "Buffer is %smodified\nmouse-1: Toggle modification state" (if (buffer-modified-p (window-buffer window)) "" "not "))) -(defvar mode-line-modified +(defvar-local mode-line-modified (list (propertize "%1*" 'help-echo 'mode-line-read-only-help-echo @@ -264,9 +263,8 @@ mnemonics of the following coding systems: "Mode line construct for displaying whether current buffer is modified.") ;;;###autoload (put 'mode-line-modified 'risky-local-variable t) -(make-variable-buffer-local 'mode-line-modified) -(defvar mode-line-remote +(defvar-local mode-line-remote (list (propertize "%1@" 'mouse-face 'mode-line-highlight @@ -283,7 +281,6 @@ mnemonics of the following coding systems: "Mode line construct to indicate a remote buffer.") ;;;###autoload (put 'mode-line-remote 'risky-local-variable t) -(make-variable-buffer-local 'mode-line-remote) ;; MSDOS frames have window-system, but want the Fn identification. (defun mode-line-frame-control () @@ -301,12 +298,11 @@ Value is used for `mode-line-frame-identification', which see." ;;;###autoload (put 'mode-line-frame-identification 'risky-local-variable t) -(defvar mode-line-process nil +(defvar-local mode-line-process nil "Mode line construct for displaying info on process status. Normally nil in most modes, since there is no process to display.") ;;;###autoload (put 'mode-line-process 'risky-local-variable t) -(make-variable-buffer-local 'mode-line-process) (defun bindings--define-key (map key item) "Define KEY in keymap MAP according to ITEM from a menu. @@ -543,7 +539,7 @@ mouse-1: Previous buffer\nmouse-3: Next buffer") 'mouse-face 'mode-line-highlight 'local-map mode-line-buffer-identification-keymap))) -(defvar mode-line-buffer-identification +(defvar-local mode-line-buffer-identification (propertized-buffer-identification "%12b") "Mode line construct for identifying the buffer being displayed. Its default value is (\"%12b\") with some text properties added. @@ -551,7 +547,6 @@ Major modes that edit things other than ordinary files may change this \(e.g. Info, Dired,...)") ;;;###autoload (put 'mode-line-buffer-identification 'risky-local-variable t) -(make-variable-buffer-local 'mode-line-buffer-identification) (defvar mode-line-misc-info '((global-mode-string ("" global-mode-string " "))) |