summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/emacs/search.texi7
-rw-r--r--doc/lispref/minibuf.texi19
-rw-r--r--etc/MACHINES5
-rw-r--r--etc/NEWS10
-rw-r--r--lisp/abbrev.el3
-rw-r--r--lisp/allout-widgets.el36
-rw-r--r--lisp/allout.el79
-rw-r--r--lisp/bindings.el15
-rw-r--r--lisp/buff-menu.el3
-rw-r--r--lisp/cedet/ede.el9
-rw-r--r--lisp/cedet/mode-local.el3
-rw-r--r--lisp/cedet/semantic.el36
-rw-r--r--lisp/cedet/semantic/bovine.el3
-rw-r--r--lisp/cedet/semantic/complete.el3
-rw-r--r--lisp/cedet/semantic/ctxt.el6
-rw-r--r--lisp/cedet/semantic/db-find.el6
-rw-r--r--lisp/cedet/semantic/db.el18
-rw-r--r--lisp/cedet/semantic/debug.el12
-rw-r--r--lisp/cedet/semantic/dep.el6
-rw-r--r--lisp/cedet/semantic/format.el6
-rw-r--r--lisp/cedet/semantic/fw.el3
-rw-r--r--lisp/cedet/semantic/grammar.el9
-rw-r--r--lisp/cedet/semantic/idle.el3
-rw-r--r--lisp/cedet/semantic/imenu.el3
-rw-r--r--lisp/cedet/semantic/lex-spp.el12
-rw-r--r--lisp/cedet/semantic/lex.el48
-rw-r--r--lisp/cedet/semantic/senator.el3
-rw-r--r--lisp/cedet/semantic/sort.el3
-rw-r--r--lisp/cedet/semantic/tag.el3
-rw-r--r--lisp/cedet/semantic/util-modes.el9
-rw-r--r--lisp/cedet/semantic/util.el6
-rw-r--r--lisp/cedet/semantic/wisent.el6
-rw-r--r--lisp/double.el6
-rw-r--r--lisp/emacs-lisp/chart.el3
-rw-r--r--lisp/emacs-lisp/easy-mmode.el8
-rw-r--r--lisp/emacs-lisp/edebug.el3
-rw-r--r--lisp/emacs-lisp/generic.el3
-rw-r--r--lisp/emacs-lisp/lisp-mode.el1
-rw-r--r--lisp/emacs-lisp/re-builder.el10
-rw-r--r--lisp/emacs-lisp/syntax.el3
-rw-r--r--lisp/emulation/cua-base.el8
-rw-r--r--lisp/emulation/cua-rect.el6
-rw-r--r--lisp/emulation/viper-cmd.el2
-rw-r--r--lisp/emulation/viper-init.el117
-rw-r--r--lisp/emulation/viper-keym.el22
-rw-r--r--lisp/emulation/viper-mous.el11
-rw-r--r--lisp/emulation/viper-util.el10
-rw-r--r--lisp/emulation/viper.el5
-rw-r--r--lisp/erc/erc-backend.el84
-rw-r--r--lisp/erc/erc-capab.el6
-rw-r--r--lisp/erc/erc-dcc.el9
-rw-r--r--lisp/erc/erc-ezbounce.el3
-rw-r--r--lisp/erc/erc-join.el3
-rw-r--r--lisp/erc/erc-netsplit.el3
-rw-r--r--lisp/erc/erc-networks.el3
-rw-r--r--lisp/erc/erc-notify.el6
-rw-r--r--lisp/erc/erc-ring.el6
-rw-r--r--lisp/erc/erc-stamp.el9
-rw-r--r--lisp/erc/erc.el75
-rw-r--r--lisp/files.el24
-rw-r--r--lisp/font-core.el3
-rw-r--r--lisp/font-lock.el15
-rw-r--r--lisp/international/mule-cmds.el21
-rw-r--r--lisp/international/mule.el3
-rw-r--r--lisp/international/quail.el37
-rw-r--r--lisp/international/robin.el6
-rw-r--r--lisp/isearch.el23
-rw-r--r--lisp/language/korea-util.el16
-rw-r--r--lisp/mail/emacsbug.el6
-rw-r--r--lisp/mail/reporter.el3
-rw-r--r--lisp/mail/rmail.el6
-rw-r--r--lisp/mail/supercite.el7
-rw-r--r--lisp/menu-bar.el3
-rw-r--r--lisp/minibuffer.el19
-rw-r--r--lisp/net/browse-url.el3
-rw-r--r--lisp/net/newst-backend.el1
-rw-r--r--lisp/net/newst-plainview.el1
-rw-r--r--lisp/net/rcirc.el15
-rw-r--r--lisp/net/soap-inspect.el8
-rw-r--r--lisp/net/telnet.el11
-rw-r--r--lisp/nxml/rng-cmpct.el9
-rw-r--r--lisp/nxml/rng-pttrn.el3
-rw-r--r--lisp/nxml/rng-valid.el30
-rw-r--r--lisp/play/5x5.el13
-rw-r--r--lisp/play/decipher.el12
-rw-r--r--lisp/play/gamegrid.el42
-rw-r--r--lisp/play/gametree.el1
-rw-r--r--lisp/play/snake.el26
-rw-r--r--lisp/play/tetris.el28
-rw-r--r--lisp/progmodes/compile.el15
-rw-r--r--lisp/progmodes/cpp.el18
-rw-r--r--lisp/progmodes/ebnf2ps.el15
-rw-r--r--lisp/progmodes/f90.el3
-rw-r--r--lisp/progmodes/gud.el3
-rw-r--r--lisp/progmodes/js.el19
-rw-r--r--lisp/progmodes/octave.el3
-rw-r--r--lisp/progmodes/sh-script.el3
-rw-r--r--lisp/simple.el22
-rw-r--r--lisp/subr.el1
-rw-r--r--lisp/tab-bar.el3
-rw-r--r--lisp/term/ns-win.el3
-rw-r--r--lisp/textmodes/artist.el34
-rw-r--r--lisp/textmodes/css-mode.el9
-rw-r--r--lisp/textmodes/enriched.el3
-rw-r--r--lisp/textmodes/flyspell.el39
-rw-r--r--lisp/textmodes/ispell.el10
-rw-r--r--lisp/textmodes/less-css-mode.el1
-rw-r--r--lisp/textmodes/refill.el6
-rw-r--r--lisp/textmodes/sgml-mode.el6
-rw-r--r--lisp/textmodes/table.el3
-rw-r--r--lisp/textmodes/tex-mode.el3
-rw-r--r--lisp/textmodes/two-column.el6
-rw-r--r--lisp/vc/ediff-diff.el15
-rw-r--r--lisp/vc/ediff-init.el5
-rw-r--r--lisp/vc/smerge-mode.el3
-rw-r--r--lisp/vc/vc-bzr.el3
-rw-r--r--lisp/vc/vc-dispatcher.el3
-rw-r--r--lisp/vc/vc.el3
-rw-r--r--lisp/window.el27
-rw-r--r--src/macros.c5
-rw-r--r--src/minibuf.c64
-rw-r--r--src/nsmenu.m4
-rw-r--r--test/lisp/minibuffer-tests.el24
123 files changed, 623 insertions, 974 deletions
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 637867b8115..f3c42bcea7f 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -2027,6 +2027,13 @@ highlighting:
@item lazy-highlight-initial-delay
@vindex lazy-highlight-initial-delay
Time in seconds to wait before highlighting visible matches.
+Applies only if the search string is less than
+@code{lazy-highlight-no-delay-length} characters long.
+
+@item lazy-highlight-no-delay-length
+@vindex lazy-highlight-no-delay-length
+For search strings at least as long as the value of this variable,
+lazy highlighting of matches starts immediately.
@item lazy-highlight-interval
@vindex lazy-highlight-interval
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index 0ce17ed571a..185d355ba70 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -1799,15 +1799,19 @@ pairs. The following properties are supported:
The value should be a function to add annotations in the completions
buffer. This function must accept one argument, a completion, and
should either return @code{nil} or a string to be displayed next to
-the completion.
+the completion. Unless this function puts own face on the annotation
+suffix string, the @code{completions-annotations} face is added by
+default to that string.
@item :affixation-function
The value should be a function to add prefixes and suffixes to
completions. This function must accept one argument, a list of
completions, and should return such a list of completions where
each element contains a list of three elements: a completion,
-a prefix string, and a suffix string. This function takes priority
-over @code{:annotation-function}.
+a prefix string, and a suffix string. When this function
+returns a list of two elements, it is interpreted as a list
+of a completion and a suffix string like in @code{:annotation-function}.
+This function takes priority over @code{:annotation-function}.
@item :exit-function
The value should be a function to run after performing completion.
@@ -1907,6 +1911,9 @@ The value should be a function for @dfn{annotating} completions. The
function should take one argument, @var{string}, which is a possible
completion. It should return a string, which is displayed after the
completion @var{string} in the @file{*Completions*} buffer.
+Unless this function puts own face on the annotation suffix string,
+the @code{completions-annotations} face is added by default to
+that string.
@item affixation-function
The value should be a function for adding prefixes and suffixes to
@@ -1915,8 +1922,10 @@ completions. The function should take one argument,
return such a list of @var{completions} where each element contains a list
of three elements: a completion, a prefix which is displayed before
the completion string in the @file{*Completions*} buffer, and
-a suffix displayed after the completion string. This function
-takes priority over @code{annotation-function}.
+a suffix displayed after the completion string. When this function
+returns a list of two elements, it is interpreted as a list of
+a completion and a suffix string like in @code{annotation-function}.
+This function takes priority over @code{annotation-function}.
@item display-sort-function
The value should be a function for sorting completions. The function
diff --git a/etc/MACHINES b/etc/MACHINES
index 97995777370..d8d0b86fb4d 100644
--- a/etc/MACHINES
+++ b/etc/MACHINES
@@ -66,8 +66,9 @@ the list at the end of this file.
** macOS
- Mac OS X 10.6 or newer. PowerPC is not supported.
- For installation instructions see the file nextstep/INSTALL.
+ Mac OS X 10.6 or newer. Both AArch64 (Arm) and x86-64 systems are
+ supported, but PowerPC is not supported. For installation
+ instructions see the file nextstep/INSTALL.
** Microsoft Windows
diff --git a/etc/NEWS b/etc/NEWS
index 7b4b7fea5a2..29499639e70 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -226,6 +226,13 @@ C-M-<return> instead of <C-M-return>. Either variant can be used as
input; functions such as 'kbd' and 'read-kbd-macro' accept both styles
as equivalent (they have done so for a long time).
++++
+** New user option 'lazy-highlight-no-delay-length'.
+Lazy highlighting of matches in Isearch now starts immediately if the
+search string is at least this long. 'lazy-highlight-initial-delay'
+still applies for shorter search strings, which avoids flicker in the
+search buffer due to too many matches being highlighted.
+
* Editing Changes in Emacs 28.1
@@ -2010,6 +2017,9 @@ directory instead of the default directory.
* Incompatible Lisp Changes in Emacs 28.1
+** 'completions-annotations' face is not used when the caller puts own face.
+This affects the suffix specified by completion 'annotation-function'.
+
** 'set-process-buffer' now updates the process mark.
The mark will be set to point to the end of the new buffer.
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 65f71183856..54783db2c3e 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -516,9 +516,8 @@ It is nil if the abbrev has already been unexpanded.")
(defvar last-abbrev-location 0
"The location of the start of the last abbrev expanded.")
-;; (defvar local-abbrev-table fundamental-mode-abbrev-table
+;; (defvar-local local-abbrev-table fundamental-mode-abbrev-table
;; "Local (mode-specific) abbrev table of current buffer.")
-;; (make-variable-buffer-local 'local-abbrev-table)
(defun clear-abbrev-table (table)
"Undefine all abbrevs in abbrev table TABLE, leaving it empty."
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index d31083e4271..7dcf36851f2 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -78,9 +78,8 @@
;;; during file load, so the involved code must reside above that
;;; definition in the file.
;;;_ = allout-widgets-mode
-(defvar allout-widgets-mode nil
+(defvar-local allout-widgets-mode nil
"Allout mode enhanced with graphical widgets.")
-(make-variable-buffer-local 'allout-widgets-mode)
;;;_ : USER CUSTOMIZATION VARIABLES and incidental functions:
;;;_ > defgroup allout-widgets
@@ -243,14 +242,13 @@ decreases as obsolete widgets are garbage collected."
:version "24.1"
:type 'boolean
:group 'allout-widgets-developer)
-(defvar allout-widgets-tally nil
+(defvar-local allout-widgets-tally nil
"Hash-table of existing allout widgets, for debugging.
Table is maintained only if `allout-widgets-maintain-tally' is non-nil.
The table contents will be out of sync if any widgets are created
or deleted while this variable is nil.")
-(make-variable-buffer-local 'allout-widgets-tally)
(defvar allout-widgets-mode-inhibit) ; defined below
;;;_ > allout-widgets-tally-string
(defun allout-widgets-tally-string ()
@@ -295,7 +293,7 @@ to publicize it by making it a customization variable)."
(message "%s" msg)
msg))
;;;_ = allout-widgets-mode-inhibit
-(defvar allout-widgets-mode-inhibit nil
+(defvar-local allout-widgets-mode-inhibit nil
"Inhibit `allout-widgets-mode' from activating widgets.
This also inhibits automatic adjustment of widgets to track allout outline
@@ -310,15 +308,13 @@ buffers where this is set to enable and disable widget
enhancements, directly.")
;;;###autoload
(put 'allout-widgets-mode-inhibit 'safe-local-variable 'booleanp)
-(make-variable-buffer-local 'allout-widgets-mode-inhibit)
;;;_ = allout-inhibit-body-modification-hook
-(defvar allout-inhibit-body-modification-hook nil
+(defvar-local allout-inhibit-body-modification-hook nil
"Override de-escaping of text-prefixes in item bodies during specific changes.
This is used by `allout-buffer-modification-handler' to signal such changes
to `allout-body-modification-handler', and is always reset by
`allout-post-command-business'.")
-(make-variable-buffer-local 'allout-inhibit-body-modification-hook)
;;;_ = allout-widgets-icons-cache
(defvar allout-widgets-icons-cache nil
"Cache allout icon images, as an association list.
@@ -358,7 +354,7 @@ See \\[describe-mode] for many more options."
The structure includes the guides lines, bullet, and bullet cue.")
;;;_ = allout-widgets-changes-record
-(defvar allout-widgets-changes-record nil
+(defvar-local allout-widgets-changes-record nil
"Record outline changes for processing by post-command hook.
Entries on the list are lists whose first element is a symbol indicating
@@ -369,14 +365,12 @@ type. For example:
The changes are recorded in reverse order, with new values pushed
onto the front.")
-(make-variable-buffer-local 'allout-widgets-changes-record)
;;;_ = allout-widgets-undo-exposure-record
-(defvar allout-widgets-undo-exposure-record nil
+(defvar-local allout-widgets-undo-exposure-record nil
"Record outline undo traces for processing by post-command hook.
The changes are recorded in reverse order, with new values pushed
onto the front.")
-(make-variable-buffer-local 'allout-widgets-undo-exposure-record)
;;;_ = allout-widgets-last-hook-error
(defvar allout-widgets-last-hook-error nil
"String holding last error string, for debugging purposes.")
@@ -393,13 +387,12 @@ onto the front.")
"Maintained true during `allout-widgets-exposure-undo-processor'")
;;;_ , Widget-specific outline text format
;;;_ = allout-escaped-prefix-regexp
-(defvar allout-escaped-prefix-regexp ""
+(defvar-local allout-escaped-prefix-regexp ""
"Regular expression for body text that would look like an item prefix if
not altered with an escape sequence.")
-(make-variable-buffer-local 'allout-escaped-prefix-regexp)
;;;_ , Widget element formatting
;;;_ = allout-item-icon-keymap
-(defvar allout-item-icon-keymap
+(defvar-local allout-item-icon-keymap
(let ((km (make-sparse-keymap))
(as-parent (if (current-local-map)
(make-composed-keymap (current-local-map)
@@ -420,9 +413,8 @@ not altered with an escape sequence.")
km)
"General tree-node key bindings.")
-(make-variable-buffer-local 'allout-item-icon-keymap)
;;;_ = allout-item-body-keymap
-(defvar allout-item-body-keymap
+(defvar-local allout-item-body-keymap
(let ((km (make-sparse-keymap))
(as-parent (if (current-local-map)
(make-composed-keymap (current-local-map)
@@ -432,17 +424,15 @@ not altered with an escape sequence.")
(set-keymap-parent km as-parent)
km)
"General key bindings for the text content of outline items.")
-(make-variable-buffer-local 'allout-item-body-keymap)
;;;_ = allout-body-span-category
(defvar allout-body-span-category nil
"Symbol carrying allout body-text overlay properties.")
;;;_ = allout-cue-span-keymap
-(defvar allout-cue-span-keymap
+(defvar-local allout-cue-span-keymap
(let ((km (make-sparse-keymap)))
(set-keymap-parent km allout-item-icon-keymap)
km)
"Keymap used in the item cue area - the space between the icon and headline.")
-(make-variable-buffer-local 'allout-cue-span-keymap)
;;;_ = allout-escapes-category
(defvar allout-escapes-category nil
"Symbol for category of text property used to hide escapes of prefix-like
@@ -477,7 +467,7 @@ including things like:
(defvar allout-trailing-category nil
"Symbol carrying common properties of an overlay's trailing newline.")
;;;_ , Developer
-(defvar allout-widgets-last-decoration-timing nil
+(defvar-local allout-widgets-last-decoration-timing nil
"Timing details for the last cooperative decoration action.
This is maintained when `allout-widgets-time-decoration-activity' is set.
@@ -488,7 +478,6 @@ The value is a list containing two elements:
When active, the value is revised each time automatic decoration activity
happens in the buffer.")
-(make-variable-buffer-local 'allout-widgets-last-decoration-timing)
;;;_ . mode hookup
;;;_ > define-minor-mode allout-widgets-mode (arg)
;;;###autoload
@@ -693,12 +682,11 @@ outline hot-spot navigation (see `allout-mode')."
(allout-get-or-create-item-widget))))))
;;;_ . settings context
;;;_ = allout-container-item
-(defvar allout-container-item-widget nil
+(defvar-local allout-container-item-widget nil
"A widget for the current outline's overarching container as an item.
The item has settings (of the file/connection) and maybe a body, but no
icon/bullet.")
-(make-variable-buffer-local 'allout-container-item-widget)
;;;_ . Hooks and hook helpers
;;;_ , major command-loop business:
;;;_ > allout-widgets-pre-command-business (&optional recursing)
diff --git a/lisp/allout.el b/lisp/allout.el
index 39aa29b664a..ff0b67556e0 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -830,9 +830,8 @@ such topics are encrypted.)"
The value of `buffer-saved-size' at the time of decryption is used,
for restoring when all encryptions are established.")
-(defvar allout-just-did-undo nil
+(defvar-local allout-just-did-undo nil
"True just after undo commands, until allout-post-command-business.")
-(make-variable-buffer-local 'allout-just-did-undo)
;;;_ + Developer
;;;_ = allout-developer group
@@ -874,10 +873,10 @@ For details, see `allout-toggle-current-subtree-encryption's docstring."
msg))
;;;_ : Mode activation (defined here because it's referenced early)
;;;_ = allout-mode
-(defvar allout-mode nil "Allout outline mode minor-mode flag.")
-(make-variable-buffer-local 'allout-mode)
+(defvar-local allout-mode nil
+ "Allout outline mode minor-mode flag.")
;;;_ = allout-layout nil
-(defvar allout-layout nil ; LEAVE GLOBAL VALUE NIL -- see docstring.
+(defvar-local allout-layout nil ; LEAVE GLOBAL VALUE NIL -- see docstring.
"Buffer-specific setting for allout layout.
In buffers where this is non-nil (and if `allout-auto-activation'
@@ -903,34 +902,30 @@ followed by the equivalent of `(allout-expose-topic 0 : -1 -1 0)'.
`allout-default-layout' describes the specification format.
`allout-layout' can additionally have the value t, in which
case the value of `allout-default-layout' is used.")
-(make-variable-buffer-local 'allout-layout)
;;;###autoload
(put 'allout-layout 'safe-local-variable
(lambda (x) (or (numberp x) (listp x) (memq x '(: * + -)))))
;;;_ : Topic header format
;;;_ = allout-regexp
-(defvar allout-regexp ""
+(defvar-local allout-regexp ""
"Regular expression to match the beginning of a heading line.
Any line whose beginning matches this regexp is considered a
heading. This var is set according to the user configuration vars
by `allout-set-regexp'.")
-(make-variable-buffer-local 'allout-regexp)
;;;_ = allout-bullets-string
-(defvar allout-bullets-string ""
+(defvar-local allout-bullets-string ""
"A string dictating the valid set of outline topic bullets.
This var should *not* be set by the user -- it is set by `allout-set-regexp',
and is produced from the elements of `allout-plain-bullets-string'
and `allout-distinctive-bullets-string'.")
-(make-variable-buffer-local 'allout-bullets-string)
;;;_ = allout-bullets-string-len
-(defvar allout-bullets-string-len 0
+(defvar-local allout-bullets-string-len 0
"Length of current buffers' `allout-plain-bullets-string'.")
-(make-variable-buffer-local 'allout-bullets-string-len)
;;;_ = allout-depth-specific-regexp
-(defvar allout-depth-specific-regexp ""
+(defvar-local allout-depth-specific-regexp ""
"Regular expression to match a heading line prefix for a particular depth.
This expression is used to search for depth-specific topic
@@ -941,34 +936,28 @@ This var is set according to the user configuration vars by
`allout-set-regexp'. It is prepared with format strings for two
decimal numbers, which should each be one less than the depth of the
topic prefix to be matched.")
-(make-variable-buffer-local 'allout-depth-specific-regexp)
;;;_ = allout-depth-one-regexp
-(defvar allout-depth-one-regexp ""
+(defvar-local allout-depth-one-regexp ""
"Regular expression to match a heading line prefix for depth one.
This var is set according to the user configuration vars by
`allout-set-regexp'. It is prepared with format strings for two
decimal numbers, which should each be one less than the depth of the
topic prefix to be matched.")
-(make-variable-buffer-local 'allout-depth-one-regexp)
;;;_ = allout-line-boundary-regexp
-(defvar allout-line-boundary-regexp ()
+(defvar-local allout-line-boundary-regexp ()
"`allout-regexp' prepended with a newline for the search target.
This is properly set by `allout-set-regexp'.")
-(make-variable-buffer-local 'allout-line-boundary-regexp)
;;;_ = allout-bob-regexp
-(defvar allout-bob-regexp ()
+(defvar-local allout-bob-regexp ()
"Like `allout-line-boundary-regexp', for headers at beginning of buffer.")
-(make-variable-buffer-local 'allout-bob-regexp)
;;;_ = allout-header-subtraction
-(defvar allout-header-subtraction (1- (length allout-header-prefix))
+(defvar-local allout-header-subtraction (1- (length allout-header-prefix))
"Allout-header prefix length to subtract when computing topic depth.")
-(make-variable-buffer-local 'allout-header-subtraction)
;;;_ = allout-plain-bullets-string-len
-(defvar allout-plain-bullets-string-len (length allout-plain-bullets-string)
+(defvar-local allout-plain-bullets-string-len (length allout-plain-bullets-string)
"Length of `allout-plain-bullets-string', updated by `allout-set-regexp'.")
-(make-variable-buffer-local 'allout-plain-bullets-string-len)
;;;_ = allout-doublecheck-at-and-shallower
(defconst allout-doublecheck-at-and-shallower 3
@@ -1279,11 +1268,10 @@ Also refresh various data structures that hinge on the regexp."
["Set New Exposure" allout-expose-topic t])))
;;;_ : Allout Modal-Variables Utilities
;;;_ = allout-mode-prior-settings
-(defvar allout-mode-prior-settings nil
+(defvar-local allout-mode-prior-settings nil
"Internal `allout-mode' use; settings to be resumed on mode deactivation.
See `allout-add-resumptions' and `allout-do-resumptions'.")
-(make-variable-buffer-local 'allout-mode-prior-settings)
;;;_ > allout-add-resumptions (&rest pairs)
(defun allout-add-resumptions (&rest pairs)
"Set name/value PAIRS.
@@ -1466,16 +1454,15 @@ that was affected by the undo.."
:version "24.3")
;;;_ = allout-outside-normal-auto-fill-function
-(defvar allout-outside-normal-auto-fill-function nil
+(defvar-local allout-outside-normal-auto-fill-function nil
"Value of `normal-auto-fill-function' outside of allout mode.
Used by `allout-auto-fill' to do the mandated `normal-auto-fill-function'
wrapped within allout's automatic `fill-prefix' setting.")
-(make-variable-buffer-local 'allout-outside-normal-auto-fill-function)
;;;_ = prevent redundant activation by desktop mode:
(add-to-list 'desktop-minor-mode-handlers '(allout-mode . nil))
;;;_ = allout-after-save-decrypt
-(defvar allout-after-save-decrypt nil
+(defvar-local allout-after-save-decrypt nil
"Internal variable, is nil or has the value of two points:
- the location of a topic to be decrypted after saving is done
@@ -1483,9 +1470,8 @@ wrapped within allout's automatic `fill-prefix' setting.")
This is used to decrypt the topic that was currently being edited, if it
was encrypted automatically as part of a file write or autosave.")
-(make-variable-buffer-local 'allout-after-save-decrypt)
;;;_ = allout-encryption-plaintext-sanitization-regexps
-(defvar allout-encryption-plaintext-sanitization-regexps nil
+(defvar-local allout-encryption-plaintext-sanitization-regexps nil
"List of regexps whose matches are removed from plaintext before encryption.
This is for the sake of removing artifacts, like escapes, that are added on
@@ -1498,9 +1484,8 @@ Each value can be a regexp or a list with a regexp followed by a
substitution string. If it's just a regexp, all its matches are removed
before the text is encrypted. If it's a regexp and a substitution, the
substitution is used against the regexp matches, a la `replace-match'.")
-(make-variable-buffer-local 'allout-encryption-plaintext-sanitization-regexps)
;;;_ = allout-encryption-ciphertext-rejection-regexps
-(defvar allout-encryption-ciphertext-rejection-regexps nil
+(defvar-local allout-encryption-ciphertext-rejection-regexps nil
"Variable for regexps matching plaintext to remove before encryption.
This is used to detect strings in encryption results that would
@@ -1513,13 +1498,11 @@ Encryptions that result in matches will be retried, up to
`allout-encryption-ciphertext-rejection-ceiling' times, after which
an error is raised.")
-(make-variable-buffer-local 'allout-encryption-ciphertext-rejection-regexps)
;;;_ = allout-encryption-ciphertext-rejection-ceiling
-(defvar allout-encryption-ciphertext-rejection-ceiling 5
+(defvar-local allout-encryption-ciphertext-rejection-ceiling 5
"Limit on number of times encryption ciphertext is rejected.
See `allout-encryption-ciphertext-rejection-regexps' for rejection reasons.")
-(make-variable-buffer-local 'allout-encryption-ciphertext-rejection-ceiling)
;;;_ > allout-mode-p ()
;; Must define this macro above any uses, or byte compilation will lack
;; proper def, if file isn't loaded -- eg, during emacs build!
@@ -1607,10 +1590,9 @@ non-nil in a lasting way.")
;;;_ #2 Mode environment and activation
;;;_ = allout-explicitly-deactivated
-(defvar allout-explicitly-deactivated nil
+(defvar-local allout-explicitly-deactivated nil
"If t, `allout-mode's last deactivation was deliberate.
So `allout-post-command-business' should not reactivate it...")
-(make-variable-buffer-local 'allout-explicitly-deactivated)
;;;_ > allout-setup-menubar ()
(defun allout-setup-menubar ()
"Populate the current buffer's menubar with `allout-mode' stuff."
@@ -2119,21 +2101,17 @@ function can also be used as an `isearch-mode-end-hook'."
;; for just-established data. This optimization can provide
;; significant speed improvement, but it must be employed carefully.
;;;_ = allout-recent-prefix-beginning
-(defvar allout-recent-prefix-beginning 0
+(defvar-local allout-recent-prefix-beginning 0
"Buffer point of the start of the last topic prefix encountered.")
-(make-variable-buffer-local 'allout-recent-prefix-beginning)
;;;_ = allout-recent-prefix-end
-(defvar allout-recent-prefix-end 0
+(defvar-local allout-recent-prefix-end 0
"Buffer point of the end of the last topic prefix encountered.")
-(make-variable-buffer-local 'allout-recent-prefix-end)
;;;_ = allout-recent-depth
-(defvar allout-recent-depth 0
+(defvar-local allout-recent-depth 0
"Depth of the last topic prefix encountered.")
-(make-variable-buffer-local 'allout-recent-depth)
;;;_ = allout-recent-end-of-subtree
-(defvar allout-recent-end-of-subtree 0
+(defvar-local allout-recent-end-of-subtree 0
"Buffer point last returned by `allout-end-of-current-subtree'.")
-(make-variable-buffer-local 'allout-recent-end-of-subtree)
;;;_ > allout-prefix-data ()
(defsubst allout-prefix-data ()
"Register allout-prefix state data.
@@ -3213,7 +3191,7 @@ Returns resulting position, else nil if none found."
;;;_ - Fundamental
;;;_ = allout-post-goto-bullet
-(defvar allout-post-goto-bullet nil
+(defvar-local allout-post-goto-bullet nil
"Outline internal var, for `allout-pre-command-business' hot-spot operation.
When set, tells post-processing to reposition on topic bullet, and
@@ -3221,18 +3199,15 @@ then unset it. Set by `allout-pre-command-business' when implementing
hot-spot operation, where literal characters typed over a topic bullet
are mapped to the command of the corresponding control-key on the
`allout-mode-map-value'.")
-(make-variable-buffer-local 'allout-post-goto-bullet)
;;;_ = allout-command-counter
-(defvar allout-command-counter 0
+(defvar-local allout-command-counter 0
"Counter that monotonically increases in allout-mode buffers.
Set by `allout-pre-command-business', to support allout addons in
coordinating with allout activity.")
-(make-variable-buffer-local 'allout-command-counter)
;;;_ = allout-this-command-hid-text
-(defvar allout-this-command-hid-text nil
+(defvar-local allout-this-command-hid-text nil
"True if the most recent allout-mode command hid any text.")
-(make-variable-buffer-local 'allout-this-command-hid-text)
;;;_ > allout-post-command-business ()
(defun allout-post-command-business ()
"Outline `post-command-hook' function.
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 " ")))
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 49f8604f52e..bb39e1f5795 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -111,11 +111,10 @@ as it is by default."
:group 'Buffer-menu
:version "22.1")
-(defvar Buffer-menu-files-only nil
+(defvar-local Buffer-menu-files-only nil
"Non-nil if the current Buffer Menu lists only file buffers.
This is set by the prefix argument to `buffer-menu' and related
commands.")
-(make-variable-buffer-local 'Buffer-menu-files-only)
(defvar Buffer-menu-mode-map
(let ((map (make-sparse-keymap))
diff --git a/lisp/cedet/ede.el b/lisp/cedet/ede.el
index 14289153e81..e3cc9062ed4 100644
--- a/lisp/cedet/ede.el
+++ b/lisp/cedet/ede.el
@@ -140,22 +140,19 @@ specified by `ede-project-directories'."
(defvar ede-projects nil
"A list of all active projects currently loaded in Emacs.")
-(defvar ede-object-root-project nil
+(defvar-local ede-object-root-project nil
"The current buffer's current root project.
If a file is under a project, this specifies the project that is at
the root of a project tree.")
-(make-variable-buffer-local 'ede-object-root-project)
-(defvar ede-object-project nil
+(defvar-local ede-object-project nil
"The current buffer's current project at that level.
If a file is under a project, this specifies the project that contains the
current target.")
-(make-variable-buffer-local 'ede-object-project)
-(defvar ede-object nil
+(defvar-local ede-object nil
"The current buffer's target object.
This object's class determines how to compile and debug from a buffer.")
-(make-variable-buffer-local 'ede-object)
(defvar ede-selected-object nil
"The currently user-selected project or target.
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index d1e528c4a02..63e0cef61a3 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -170,11 +170,10 @@ definition."
;;; Core bindings API
;;
-(defvar mode-local-symbol-table nil
+(defvar-local mode-local-symbol-table nil
"Buffer local mode bindings.
These symbols provide a hook for a `major-mode' to specify specific
behaviors. Use the function `mode-local-bind' to define new bindings.")
-(make-variable-buffer-local 'mode-local-symbol-table)
(defvar mode-local-active-mode nil
"Major mode in which bindings are active.")
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index c64a9822c6b..44bd4b0cd82 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -77,13 +77,12 @@ introduced."
;;; Variables and Configuration
;;
-(defvar semantic--parse-table nil
+(defvar-local semantic--parse-table nil
"Variable that defines how to parse top level items in a buffer.
This variable is for internal use only, and its content depends on the
external parser used.")
-(make-variable-buffer-local 'semantic--parse-table)
-(defvar semantic-symbol->name-assoc-list
+(defvar-local semantic-symbol->name-assoc-list
'((type . "Types")
(variable . "Variables")
(function . "Functions")
@@ -95,22 +94,19 @@ It is sometimes useful for a language to use a different string
in place of the default, even though that language will still
return a symbol. For example, Java return's includes, but the
string can be replaced with `Imports'.")
-(make-variable-buffer-local 'semantic-symbol->name-assoc-list)
-(defvar semantic-symbol->name-assoc-list-for-type-parts nil
+(defvar-local semantic-symbol->name-assoc-list-for-type-parts nil
"Like `semantic-symbol->name-assoc-list' for type parts.
Some tags that have children (see `semantic-tag-children-compatibility')
will want to define the names of classes of tags differently than at
the top level. For example, in C++, a Function may be called a
Method. In addition, there may be new types of tags that exist only
in classes, such as protection labels.")
-(make-variable-buffer-local 'semantic-symbol->name-assoc-list-for-type-parts)
-(defvar semantic-case-fold nil
+(defvar-local semantic-case-fold nil
"Value for `case-fold-search' when parsing.")
-(make-variable-buffer-local 'semantic-case-fold)
-(defvar semantic--buffer-cache nil
+(defvar-local semantic--buffer-cache nil
"A cache of the fully parsed buffer.
If no significant changes have been made (based on the state) then
this is returned instead of re-parsing the buffer.
@@ -120,16 +116,13 @@ this is returned instead of re-parsing the buffer.
If you need a tag list, use `semantic-fetch-tags'. If you need the
cached values for some reason, chances are you can add a hook to
`semantic-after-toplevel-cache-change-hook'.")
-(make-variable-buffer-local 'semantic--buffer-cache)
-(defvar semantic-unmatched-syntax-cache nil
+(defvar-local semantic-unmatched-syntax-cache nil
"A cached copy of unmatched syntax tokens.")
-(make-variable-buffer-local 'semantic-unmatched-syntax-cache)
-(defvar semantic-unmatched-syntax-cache-check nil
+(defvar-local semantic-unmatched-syntax-cache-check nil
"Non-nil if the unmatched syntax cache is out of date.
This is tracked with `semantic-change-function'.")
-(make-variable-buffer-local 'semantic-unmatched-syntax-cache-check)
(defvar semantic-edits-are-safe nil
"When non-nil, modifications do not require a reparse.
@@ -180,19 +173,16 @@ during a flush when the cache is given a new value of nil.")
:group 'semantic
:type 'boolean)
-(defvar semantic-parser-name "LL"
+(defvar-local semantic-parser-name "LL"
"Optional name of the parser used to parse input stream.")
-(make-variable-buffer-local 'semantic-parser-name)
-(defvar semantic--completion-cache nil
+(defvar-local semantic--completion-cache nil
"Internal variable used by `semantic-complete-symbol'.")
-(make-variable-buffer-local 'semantic--completion-cache)
;;; Parse tree state management API
;;
-(defvar semantic-parse-tree-state 'needs-rebuild
+(defvar-local semantic-parse-tree-state 'needs-rebuild
"State of the current parse tree.")
-(make-variable-buffer-local 'semantic-parse-tree-state)
(defmacro semantic-parse-tree-unparseable ()
"Indicate that the current buffer is unparseable.
@@ -268,9 +258,8 @@ These functions are called by `semantic-new-buffer-fcn', before
(defvar semantic-init-hook nil
"Hook run when a buffer is initialized with a parsing table.")
-(defvar semantic-init-mode-hook nil
+(defvar-local semantic-init-mode-hook nil
"Hook run when a buffer of a particular mode is initialized.")
-(make-variable-buffer-local 'semantic-init-mode-hook)
(defvar semantic-init-db-hook nil
"Hook run when a buffer is initialized with a parsing table for DBs.
@@ -729,9 +718,8 @@ This function returns semantic tags without overlays."
;;
;; Any parser can use this API to provide a list of warnings during a
;; parse which a user may want to investigate.
-(defvar semantic-parser-warnings nil
+(defvar-local semantic-parser-warnings nil
"A list of parser warnings since the last full reparse.")
-(make-variable-buffer-local 'semantic-parser-warnings)
(defun semantic-clear-parser-warnings ()
"Clear the current list of parser warnings for this buffer."
diff --git a/lisp/cedet/semantic/bovine.el b/lisp/cedet/semantic/bovine.el
index 034ecb5ea1c..3bc0e4dd618 100644
--- a/lisp/cedet/semantic/bovine.el
+++ b/lisp/cedet/semantic/bovine.el
@@ -41,10 +41,9 @@
;;; Variables
;;
-(defvar semantic-bovinate-nonterminal-check-obarray nil
+(defvar-local semantic-bovinate-nonterminal-check-obarray nil
"Obarray of streams already parsed for nonterminal symbols.
Use this to detect infinite recursion during a parse.")
-(make-variable-buffer-local 'semantic-bovinate-nonterminal-check-obarray)
diff --git a/lisp/cedet/semantic/complete.el b/lisp/cedet/semantic/complete.el
index 0a80b428e8e..c83505818f5 100644
--- a/lisp/cedet/semantic/complete.el
+++ b/lisp/cedet/semantic/complete.el
@@ -867,9 +867,8 @@ Expected return values are:
;; * semantic-collector-try-completion
;; * semantic-collector-all-completions
-(defvar semantic-collector-per-buffer-list nil
+(defvar-local semantic-collector-per-buffer-list nil
"List of collectors active in this buffer.")
-(make-variable-buffer-local 'semantic-collector-per-buffer-list)
(defvar semantic-collector-list nil
"List of global collectors active this session.")
diff --git a/lisp/cedet/semantic/ctxt.el b/lisp/cedet/semantic/ctxt.el
index 4d2defde35b..8d5b5dcdbdf 100644
--- a/lisp/cedet/semantic/ctxt.el
+++ b/lisp/cedet/semantic/ctxt.el
@@ -32,17 +32,15 @@
(require 'semantic)
;;; Code:
-(defvar semantic-command-separation-character
+(defvar-local semantic-command-separation-character
";"
"String which indicates the end of a command.
Used for identifying the end of a single command.")
-(make-variable-buffer-local 'semantic-command-separation-character)
-(defvar semantic-function-argument-separation-character
+(defvar-local semantic-function-argument-separation-character
","
"String which indicates the end of an argument.
Used for identifying arguments to functions.")
-(make-variable-buffer-local 'semantic-function-argument-separation-character)
;;; Local Contexts
;;
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index 14726e503d5..db88463bfd1 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -426,17 +426,15 @@ Default action as described in `semanticdb-find-translate-path'."
;; searchable item, then instead do the regular thing without caching.
(semanticdb-find-translate-path-includes--internal path))))
-(defvar semanticdb-find-lost-includes nil
+(defvar-local semanticdb-find-lost-includes nil
"Include files that we cannot find associated with this buffer.")
-(make-variable-buffer-local 'semanticdb-find-lost-includes)
-(defvar semanticdb-find-scanned-include-tags nil
+(defvar-local semanticdb-find-scanned-include-tags nil
"All include tags scanned, plus action taken on the tag.
Each entry is an alist:
(ACTION . TAG)
where ACTION is one of `scanned', `duplicate', `lost'
and TAG is a clone of the include tag that was found.")
-(make-variable-buffer-local 'semanticdb-find-scanned-include-tags)
(defvar semanticdb-implied-include-tags nil
"Include tags implied for all files of a given mode.
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index b9b10917dc6..8f9eceea554 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -50,27 +50,23 @@
(defvar semanticdb-database-list nil
"List of all active databases.")
-(defvar semanticdb-new-database-class 'semanticdb-project-database-file
+(defvar-local semanticdb-new-database-class 'semanticdb-project-database-file
"The default type of database created for new files.
This can be changed on a per file basis, so that some directories
are saved using one mechanism, and some directories via a different
mechanism.")
-(make-variable-buffer-local 'semanticdb-new-database-class)
-(defvar semanticdb-default-find-index-class 'semanticdb-find-search-index
+(defvar-local semanticdb-default-find-index-class 'semanticdb-find-search-index
"The default type of search index to use for a `semanticdb-table's.
This can be changed to try out new types of search indices.")
-(make-variable-buffer-local 'semanticdb-default-find=index-class)
;;;###autoload
-(defvar semanticdb-current-database nil
+(defvar-local semanticdb-current-database nil
"For a given buffer, this is the currently active database.")
-(make-variable-buffer-local 'semanticdb-current-database)
;;;###autoload
-(defvar semanticdb-current-table nil
+(defvar-local semanticdb-current-table nil
"For a given buffer, this is the currently active database table.")
-(make-variable-buffer-local 'semanticdb-current-table)
;;; ABSTRACT CLASSES
;;
@@ -825,13 +821,12 @@ must return a string, (the root directory) or a list of strings (multiple
root directories in a more complex system). This variable should be used
by project management programs like EDE or JDE.")
-(defvar semanticdb-project-system-databases nil
+(defvar-local semanticdb-project-system-databases nil
"List of databases containing system library information.
Mode authors can create their own system databases which know
detailed information about the system libraries for querying purposes.
Put those into this variable as a buffer-local, or mode-local
value.")
-(make-variable-buffer-local 'semanticdb-project-system-databases)
(defvar semanticdb-search-system-databases t
"Non-nil if search routines are to include a system database.")
@@ -1016,10 +1011,9 @@ DONTLOAD does not affect the creation of new database objects."
)
)))
-(defvar semanticdb-out-of-buffer-create-table-fcn nil
+(defvar-local semanticdb-out-of-buffer-create-table-fcn nil
"When non-nil, a function for creating a semanticdb table.
This should take a filename to be parsed.")
-(make-variable-buffer-local 'semanticdb-out-of-buffer-create-table-fcn)
(defun semanticdb-create-table-for-file-not-in-buffer (filename)
"Create a table for the file FILENAME.
diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el
index b3e8f076d07..ce4afbbf26d 100644
--- a/lisp/cedet/semantic/debug.el
+++ b/lisp/cedet/semantic/debug.el
@@ -44,24 +44,18 @@
;;; Code:
;;;###autoload
-(defvar semantic-debug-parser-source nil
+(defvar-local semantic-debug-parser-source nil
"For any buffer, the file name (no path) of the parser.
This would be a parser for a specific language, not the source
to one of the parser generators.")
-;;;###autoload
-(make-variable-buffer-local 'semantic-debug-parser-source)
;;;###autoload
-(defvar semantic-debug-parser-class nil
+(defvar-local semantic-debug-parser-class nil
"Class to create when building a debug parser object.")
-;;;###autoload
-(make-variable-buffer-local 'semantic-debug-parser-class)
;;;###autoload
-(defvar semantic-debug-parser-debugger-source nil
+(defvar-local semantic-debug-parser-debugger-source nil
"Location of the debug parser class.")
-;;;###autoload
-(make-variable-buffer-local 'semantic-debug-parser-source)
(defvar semantic-debug-enabled nil
"Non-nil when debugging a parser.")
diff --git a/lisp/cedet/semantic/dep.el b/lisp/cedet/semantic/dep.el
index 0fba2a2f091..db8be5ecf47 100644
--- a/lisp/cedet/semantic/dep.el
+++ b/lisp/cedet/semantic/dep.el
@@ -39,7 +39,7 @@
;;; Code:
-(defvar semantic-dependency-include-path nil
+(defvar-local semantic-dependency-include-path nil
"Defines the include path used when searching for files.
This should be a list of directories to search which is specific
to the file being included.
@@ -56,9 +56,8 @@ reparsed, the cache will be reset.
TODO: use ffap.el to locate such items?
NOTE: Obsolete this, or use as special user")
-(make-variable-buffer-local 'semantic-dependency-include-path)
-(defvar semantic-dependency-system-include-path nil
+(defvar-local semantic-dependency-system-include-path nil
"Defines the system include path.
This should be set with either `defvar-mode-local', or with
`semantic-add-system-include'.
@@ -71,7 +70,6 @@ When searching for a file associated with a name found in a tag of
class include, this path will be inspected for includes of type
`system'. Some include tags are agnostic to this setting and will
check both the project and system directories.")
-(make-variable-buffer-local 'semantic-dependency-system-include-path)
(defmacro defcustom-mode-local-semantic-dependency-system-include-path
(mode name value &optional docstring)
diff --git a/lisp/cedet/semantic/format.el b/lisp/cedet/semantic/format.el
index f9c5365a29f..8927ccde843 100644
--- a/lisp/cedet/semantic/format.el
+++ b/lisp/cedet/semantic/format.el
@@ -78,13 +78,11 @@ Images can be used as icons instead of some types of text strings."
:group 'semantic
:type 'boolean)
-(defvar semantic-function-argument-separator ","
+(defvar-local semantic-function-argument-separator ","
"Text used to separate arguments when creating text from tags.")
-(make-variable-buffer-local 'semantic-function-argument-separator)
-(defvar semantic-format-parent-separator "::"
+(defvar-local semantic-format-parent-separator "::"
"Text used to separate names when between namespaces/classes and functions.")
-(make-variable-buffer-local 'semantic-format-parent-separator)
(defvar semantic-format-face-alist
`( (function . font-lock-function-name-face)
diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el
index f034ba01a4f..91944c44f5e 100644
--- a/lisp/cedet/semantic/fw.el
+++ b/lisp/cedet/semantic/fw.el
@@ -243,9 +243,8 @@ Avoid using a large BODY since it is duplicated."
;;; Misc utilities
;;
-(defvar semantic-new-buffer-fcn-was-run nil
+(defvar-local semantic-new-buffer-fcn-was-run nil
"Non-nil after `semantic-new-buffer-fcn' has been executed.")
-(make-variable-buffer-local 'semantic-new-buffer-fcn-was-run)
(defsubst semantic-active-p ()
"Return non-nil if the current buffer was set up for parsing."
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 7721a834ea4..4551811c235 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -432,9 +432,8 @@ Also load the specified macro libraries."
defs)))
(nreverse defs)))
-(defvar semantic-grammar-macros nil
+(defvar-local semantic-grammar-macros nil
"List of associations (MACRO-NAME . EXPANDER).")
-(make-variable-buffer-local 'semantic-grammar-macros)
(defun semantic-grammar-macros ()
"Build and return the alist of defined macros."
@@ -1054,8 +1053,7 @@ See also the variable `semantic-grammar-file-regexp'."
;;;; Macros highlighting
;;;;
-(defvar semantic--grammar-macros-regexp-1 nil)
-(make-variable-buffer-local 'semantic--grammar-macros-regexp-1)
+(defvar-local semantic--grammar-macros-regexp-1 nil)
(defun semantic--grammar-macros-regexp-1 ()
"Return font-lock keyword regexp for pre-installed macro names."
@@ -1076,8 +1074,7 @@ See also the variable `semantic-grammar-file-regexp'."
"\\<%use-macros\\>[ \t\r\n]+\\(\\sw\\|\\s_\\)+[ \t\r\n]+{"
"Regexp that matches a macro declaration statement.")
-(defvar semantic--grammar-macros-regexp-2 nil)
-(make-variable-buffer-local 'semantic--grammar-macros-regexp-2)
+(defvar-local semantic--grammar-macros-regexp-2 nil)
(defun semantic--grammar-clear-macros-regexp-2 (&rest _)
"Clear the cached regexp that match macros local in this grammar.
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 4898c85b216..73954f0266b 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -135,10 +135,9 @@ it is unlikely the user would be ready to type again right away."
:group 'semantic
:type 'hook)
-(defvar semantic-idle-scheduler-mode nil
+(defvar-local semantic-idle-scheduler-mode nil
"Non-nil if idle-scheduler minor mode is enabled.
Use the command `semantic-idle-scheduler-mode' to change this variable.")
-(make-variable-buffer-local 'semantic-idle-scheduler-mode)
(defcustom semantic-idle-scheduler-max-buffer-size 0
"Maximum size in bytes of buffers where idle-scheduler is enabled.
diff --git a/lisp/cedet/semantic/imenu.el b/lisp/cedet/semantic/imenu.el
index 2898f3711a0..4c13959ba1d 100644
--- a/lisp/cedet/semantic/imenu.el
+++ b/lisp/cedet/semantic/imenu.el
@@ -136,12 +136,11 @@ other buffer local ones based on the same semanticdb."
"Non-nil if `semantic-imenu-rebuild-directory-indexes' is running.")
;;;###autoload
-(defvar semantic-imenu-expandable-tag-classes '(type)
+(defvar-local semantic-imenu-expandable-tag-classes '(type)
"List of expandable tag classes.
Tags of those classes will be given submenu with children.
By default, a `type' has interesting children. In Texinfo, however, a
`section' has interesting children.")
-(make-variable-buffer-local 'semantic-imenu-expandable-tag-classes)
;;; Code:
(defun semantic-imenu-tag-overlay (tag)
diff --git a/lisp/cedet/semantic/lex-spp.el b/lisp/cedet/semantic/lex-spp.el
index 8b83c09eb16..408011c6286 100644
--- a/lisp/cedet/semantic/lex-spp.el
+++ b/lisp/cedet/semantic/lex-spp.el
@@ -73,28 +73,24 @@
(declare-function c-end-of-macro "cc-engine")
;;; Code:
-(defvar semantic-lex-spp-macro-symbol-obarray nil
+(defvar-local semantic-lex-spp-macro-symbol-obarray nil
"Table of macro keywords used by the Semantic Preprocessor.
These symbols will be used in addition to those in
`semantic-lex-spp-dynamic-macro-symbol-obarray'.")
-(make-variable-buffer-local 'semantic-lex-spp-macro-symbol-obarray)
-(defvar semantic-lex-spp-project-macro-symbol-obarray nil
+(defvar-local semantic-lex-spp-project-macro-symbol-obarray nil
"Table of macro keywords for this project.
These symbols will be used in addition to those in
`semantic-lex-spp-dynamic-macro-symbol-obarray'.")
-(make-variable-buffer-local 'semantic-lex-spp-project-macro-symbol-obarray)
-(defvar semantic-lex-spp-dynamic-macro-symbol-obarray nil
+(defvar-local semantic-lex-spp-dynamic-macro-symbol-obarray nil
"Table of macro keywords used during lexical analysis.
Macros are lexical symbols which are replaced by other lexical
tokens during lexical analysis. During analysis symbols can be
added and removed from this symbol table.")
-(make-variable-buffer-local 'semantic-lex-spp-dynamic-macro-symbol-obarray)
-(defvar semantic-lex-spp-dynamic-macro-symbol-obarray-stack nil
+(defvar-local semantic-lex-spp-dynamic-macro-symbol-obarray-stack nil
"A stack of obarrays for temporarily scoped macro values.")
-(make-variable-buffer-local 'semantic-lex-spp-dynamic-macro-symbol-obarray-stack)
(defvar semantic-lex-spp-expanded-macro-stack nil
"The stack of lexical SPP macros we have expanded.")
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index 993c1dc14b6..4cafc7d4fe7 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -202,10 +202,9 @@ as a PROPERTY value. FUN receives a symbol as argument."
;; These keywords are keywords defined for using in a grammar with the
;; %keyword declaration, and are not keywords used in Emacs Lisp.
-(defvar semantic-flex-keywords-obarray nil
+(defvar-local semantic-flex-keywords-obarray nil
"Buffer local keyword obarray for the lexical analyzer.
These keywords are matched explicitly, and converted into special symbols.")
-(make-variable-buffer-local 'semantic-flex-keywords-obarray)
(defmacro semantic-lex-keyword-invalid (name)
"Signal that NAME is an invalid keyword name."
@@ -333,9 +332,8 @@ so that analysis can continue, if possible."
;; with the %type declaration. Types represent different syntaxes.
;; See code for `semantic-lex-preset-default-types' for the classic
;; types of syntax.
-(defvar semantic-lex-types-obarray nil
+(defvar-local semantic-lex-types-obarray nil
"Buffer local types obarray for the lexical analyzer.")
-(make-variable-buffer-local 'semantic-lex-types-obarray)
(defun semantic-lex-type-invalid (type)
"Signal that TYPE is an invalid lexical type name."
@@ -472,11 +470,10 @@ PROPERTY set."
;;
;; FIXME change to non-obsolete default.
-(defvar semantic-lex-analyzer 'semantic-flex
+(defvar-local semantic-lex-analyzer 'semantic-flex
"The lexical analyzer used for a given buffer.
See `semantic-lex' for documentation.
For compatibility with Semantic 1.x it defaults to `semantic-flex'.")
-(make-variable-buffer-local 'semantic-lex-analyzer)
(defvar semantic-lex-tokens
'(
@@ -558,7 +555,7 @@ The key to this alist is the symbol representing token type that
- whitespace: Characters that match `\\s-+' regexp.
This token is produced with `semantic-lex-whitespace'.")
-(defvar semantic-lex-syntax-modifications nil
+(defvar-local semantic-lex-syntax-modifications nil
"Changes to the syntax table for this buffer.
These changes are active only while the buffer is being flexed.
This is a list where each element has the form:
@@ -566,20 +563,17 @@ This is a list where each element has the form:
CHAR is the char passed to `modify-syntax-entry',
and CLASS is the string also passed to `modify-syntax-entry' to define
what syntax class CHAR has.")
-(make-variable-buffer-local 'semantic-lex-syntax-modifications)
-(defvar semantic-lex-syntax-table nil
+(defvar-local semantic-lex-syntax-table nil
"Syntax table used by lexical analysis.
See also `semantic-lex-syntax-modifications'.")
-(make-variable-buffer-local 'semantic-lex-syntax-table)
-(defvar semantic-lex-comment-regex nil
+(defvar-local semantic-lex-comment-regex nil
"Regular expression for identifying comment start during lexical analysis.
This may be automatically set when semantic initializes in a mode, but
may need to be overridden for some special languages.")
-(make-variable-buffer-local 'semantic-lex-comment-regex)
-(defvar semantic-lex-number-expression
+(defvar-local semantic-lex-number-expression
;; This expression was written by David Ponce for Java, and copied
;; here for C and any other similar language.
(eval-when-compile
@@ -628,12 +622,10 @@ FLOATING_POINT_LITERAL:
| [0-9]+<EXPONENT>[fFdD]?
| [0-9]+<EXPONENT>?[fFdD]
;")
-(make-variable-buffer-local 'semantic-lex-number-expression)
-(defvar semantic-lex-depth 0
+(defvar-local semantic-lex-depth 0
"Default lexing depth.
This specifies how many lists to create tokens in.")
-(make-variable-buffer-local 'semantic-lex-depth)
(defvar semantic-lex-unterminated-syntax-end-function
(lambda (_syntax _syntax-start lex-end) lex-end)
@@ -1768,7 +1760,7 @@ when finding unterminated syntax.")
(make-obsolete-variable 'semantic-flex-unterminated-syntax-end-function
nil "28.1")
-(defvar semantic-flex-extensions nil
+(defvar-local semantic-flex-extensions nil
"Buffer local extensions to the lexical analyzer.
This should contain an alist with a key of a regex and a data element of
a function. The function should both move point, and return a lexical
@@ -1777,10 +1769,9 @@ token of the form:
nil is also a valid return value.
TYPE can be any type of symbol, as long as it doesn't occur as a
nonterminal in the language definition.")
-(make-variable-buffer-local 'semantic-flex-extensions)
(make-obsolete-variable 'semantic-flex-extensions nil "28.1")
-(defvar semantic-flex-syntax-modifications nil
+(defvar-local semantic-flex-syntax-modifications nil
"Changes to the syntax table for this buffer.
These changes are active only while the buffer is being flexed.
This is a list where each element has the form:
@@ -1788,47 +1779,40 @@ This is a list where each element has the form:
CHAR is the char passed to `modify-syntax-entry',
and CLASS is the string also passed to `modify-syntax-entry' to define
what syntax class CHAR has.")
-(make-variable-buffer-local 'semantic-flex-syntax-modifications)
(make-obsolete-variable 'semantic-flex-syntax-modifications nil "28.1")
-(defvar semantic-ignore-comments t
+(defvar-local semantic-ignore-comments t
"Default comment handling.
The value t means to strip comments when flexing; nil means
to keep comments as part of the token stream.")
-(make-variable-buffer-local 'semantic-ignore-comments)
(make-obsolete-variable 'semantic-ignore-comments nil "28.1")
-(defvar semantic-flex-enable-newlines nil
+(defvar-local semantic-flex-enable-newlines nil
"When flexing, report newlines as syntactic elements.
Useful for languages where the newline is a special case terminator.
Only set this on a per mode basis, not globally.")
-(make-variable-buffer-local 'semantic-flex-enable-newlines)
(make-obsolete-variable 'semantic-flex-enable-newlines nil "28.1")
-(defvar semantic-flex-enable-whitespace nil
+(defvar-local semantic-flex-enable-whitespace nil
"When flexing, report whitespace as syntactic elements.
Useful for languages where the syntax is whitespace dependent.
Only set this on a per mode basis, not globally.")
-(make-variable-buffer-local 'semantic-flex-enable-whitespace)
(make-obsolete-variable 'semantic-flex-enable-whitespace nil "28.1")
-(defvar semantic-flex-enable-bol nil
+(defvar-local semantic-flex-enable-bol nil
"When flexing, report beginning of lines as syntactic elements.
Useful for languages like python which are indentation sensitive.
Only set this on a per mode basis, not globally.")
-(make-variable-buffer-local 'semantic-flex-enable-bol)
(make-obsolete-variable 'semantic-flex-enable-bol nil "28.1")
-(defvar semantic-number-expression semantic-lex-number-expression
+(defvar-local semantic-number-expression semantic-lex-number-expression
"See variable `semantic-lex-number-expression'.")
-(make-variable-buffer-local 'semantic-number-expression)
(make-obsolete-variable 'semantic-number-expression
'semantic-lex-number-expression "28.1")
-(defvar semantic-flex-depth 0
+(defvar-local semantic-flex-depth 0
"Default flexing depth.
This specifies how many lists to create tokens in.")
-(make-variable-buffer-local 'semantic-flex-depth)
(make-obsolete-variable 'semantic-flex-depth nil "28.1")
(provide 'semantic/lex)
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index 6768b432f69..f33356a170c 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -601,10 +601,9 @@ Makes C/C++ language like assumptions."
)
(t nil)))
-(defvar senator-isearch-semantic-mode nil
+(defvar-local senator-isearch-semantic-mode nil
"Non-nil if isearch does semantic search.
This is a buffer local variable.")
-(make-variable-buffer-local 'senator-isearch-semantic-mode)
(defun senator-beginning-of-defun (&optional arg)
"Move backward to the beginning of a defun.
diff --git a/lisp/cedet/semantic/sort.el b/lisp/cedet/semantic/sort.el
index 154a56a27aa..19f46ff7f15 100644
--- a/lisp/cedet/semantic/sort.el
+++ b/lisp/cedet/semantic/sort.el
@@ -310,11 +310,10 @@ may re-organize the list with side-effects."
;; external members, and bring them together in a cloned copy of the
;; class tag.
;;
-(defvar semantic-orphaned-member-metaparent-type "class"
+(defvar-local semantic-orphaned-member-metaparent-type "class"
"In `semantic-adopt-external-members', the type of 'type for metaparents.
A metaparent is a made-up type semantic token used to hold the child list
of orphaned members of a named type.")
-(make-variable-buffer-local 'semantic-orphaned-member-metaparent-type)
(defvar semantic-mark-external-member-function nil
"Function called when an externally defined orphan is found.
diff --git a/lisp/cedet/semantic/tag.el b/lisp/cedet/semantic/tag.el
index d68ffa55d6e..85defe4f2c0 100644
--- a/lisp/cedet/semantic/tag.el
+++ b/lisp/cedet/semantic/tag.el
@@ -1194,7 +1194,7 @@ See also the function `semantic--expand-tag'."
(setq tag (cdr tag)))
(null tag)))
-(defvar semantic-tag-expand-function nil
+(defvar-local semantic-tag-expand-function nil
"Function used to expand a tag.
It is passed each tag production, and must return a list of tags
derived from it, or nil if it does not need to be expanded.
@@ -1207,7 +1207,6 @@ following definition is easily parsed into one tag:
This function should take this compound tag and turn it into two tags,
one for A, and the other for B.")
-(make-variable-buffer-local 'semantic-tag-expand-function)
(defun semantic--tag-expand (tag)
"Convert TAG from a raw state to a cooked state, and expand it.
diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el
index 45eef10f005..f8d6bb759b0 100644
--- a/lisp/cedet/semantic/util-modes.el
+++ b/lisp/cedet/semantic/util-modes.el
@@ -498,10 +498,9 @@ non-nil if the minor mode is enabled."
(semantic-add-minor-mode 'semantic-show-parser-state-mode
"")
-(defvar semantic-show-parser-state-string nil
+(defvar-local semantic-show-parser-state-string nil
"String showing the parser state for this buffer.
See `semantic-show-parser-state-marker' for details.")
-(make-variable-buffer-local 'semantic-show-parser-state-string)
(defun semantic-show-parser-state-marker (&rest ignore)
"Set `semantic-show-parser-state-string' to indicate parser state.
@@ -713,10 +712,9 @@ non-nil if the minor mode is enabled."
(setq header-line-format semantic-stickyfunc-old-hlf)
(kill-local-variable 'semantic-stickyfunc-old-hlf)))))
-(defvar semantic-stickyfunc-sticky-classes
+(defvar-local semantic-stickyfunc-sticky-classes
'(function type)
"List of tag classes which stickyfunc will display in the header line.")
-(make-variable-buffer-local 'semantic-stickyfunc-sticky-classes)
(defcustom semantic-stickyfunc-show-only-functions-p nil
"Non-nil means don't show lines that aren't part of a tag.
@@ -886,9 +884,8 @@ Argument EVENT describes the event that caused this function to be called."
)
(select-window startwin)))
-(defvar semantic-highlight-func-ct-overlay nil
+(defvar-local semantic-highlight-func-ct-overlay nil
"Overlay used to highlight the tag the cursor is in.")
-(make-variable-buffer-local 'semantic-highlight-func-ct-overlay)
(defface semantic-highlight-func-current-tag-face
'((((class color) (background dark))
diff --git a/lisp/cedet/semantic/util.el b/lisp/cedet/semantic/util.el
index 7d33d0e0886..8c487e14ed5 100644
--- a/lisp/cedet/semantic/util.el
+++ b/lisp/cedet/semantic/util.el
@@ -39,20 +39,18 @@
;;; Code:
-(defvar semantic-type-relation-separator-character '(".")
+(defvar-local semantic-type-relation-separator-character '(".")
"Character strings used to separate a parent/child relationship.
This list of strings are used for displaying or finding separators
in variable field dereferencing. The first character will be used for
display. In C, a type field is separated like this: \"type.field\"
thus, the character is a \".\". In C, and additional value of \"->\"
would be in the list, so that \"type->field\" could be found.")
-(make-variable-buffer-local 'semantic-type-relation-separator-character)
-(defvar semantic-equivalent-major-modes nil
+(defvar-local semantic-equivalent-major-modes nil
"List of major modes which are considered equivalent.
Equivalent modes share a parser, and a set of override methods.
A value of nil means that the current major mode is the only one.")
-(make-variable-buffer-local 'semantic-equivalent-major-modes)
(declare-function semanticdb-file-stream "semantic/db" (file))
diff --git a/lisp/cedet/semantic/wisent.el b/lisp/cedet/semantic/wisent.el
index fb4d0b074ad..d5b73244a08 100644
--- a/lisp/cedet/semantic/wisent.el
+++ b/lisp/cedet/semantic/wisent.el
@@ -93,15 +93,13 @@ it to a form suitable for the Wisent's parser."
;;; Syntax analysis
;;
-(defvar wisent-error-function nil
+(defvar-local wisent-error-function nil
"Function used to report parse error.
By default use the function `wisent-message'.")
-(make-variable-buffer-local 'wisent-error-function)
-(defvar wisent-lexer-function 'wisent-lex
+(defvar-local wisent-lexer-function 'wisent-lex
"Function used to obtain the next lexical token in input.
Should be a lexical analyzer created with `define-wisent-lexer'.")
-(make-variable-buffer-local 'wisent-lexer-function)
;; Tag production
;;
diff --git a/lisp/double.el b/lisp/double.el
index 8bbbaa58189..d099fd06422 100644
--- a/lisp/double.el
+++ b/lisp/double.el
@@ -141,12 +141,6 @@ but not `C-u X' or `ESC X' since the X is not the prefix key."
;;; Mode
-;; This feature seemed useless and it confused describe-mode,
-;; so I deleted it.
-;; (defvar double-mode-name "Double")
-;; ;; Name of current double mode.
-;; (make-variable-buffer-local 'double-mode-name)
-
;;;###autoload
(define-minor-mode double-mode
"Toggle special insertion on double keypresses (Double mode).
diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el
index 2cd73225ff3..7d760ffc57f 100644
--- a/lisp/emacs-lisp/chart.el
+++ b/lisp/emacs-lisp/chart.el
@@ -67,9 +67,8 @@
(define-obsolete-variable-alias 'chart-map 'chart-mode-map "24.1")
(defvar chart-mode-map (make-sparse-keymap) "Keymap used in chart mode.")
-(defvar chart-local-object nil
+(defvar-local chart-local-object nil
"Local variable containing the locally displayed chart object.")
-(make-variable-buffer-local 'chart-local-object)
(defvar chart-face-color-list '("red" "green" "blue"
"cyan" "yellow" "purple")
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index f4dbcee4d69..54c0cf08b78 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -278,11 +278,10 @@ For example, you could write
((not globalp)
`(progn
:autoload-end
- (defvar ,mode ,init-value
+ (defvar-local ,mode ,init-value
,(concat (format "Non-nil if %s is enabled.\n" pretty-name)
(internal--format-docstring-line
- "Use the command `%s' to change this variable." mode)))
- (make-variable-buffer-local ',mode)))
+ "Use the command `%s' to change this variable." mode)))))
(t
(let ((base-doc-string
(concat "Non-nil if %s is enabled.
@@ -453,8 +452,7 @@ on if the hook has explicitly disabled it.
(progn
(put ',global-mode 'globalized-minor-mode t)
:autoload-end
- (defvar ,MODE-major-mode nil)
- (make-variable-buffer-local ',MODE-major-mode))
+ (defvar-local ,MODE-major-mode nil))
;; The actual global minor-mode
(define-minor-mode ,global-mode
,(concat (format "Toggle %s in all buffers.\n" pretty-name)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 1ded0e7b097..84191af88cc 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -2641,12 +2641,11 @@ See `edebug-behavior-alist' for implementations.")
;; window-start now stored with each function.
-;;(defvar edebug-window-start nil)
+;;(defvar-local edebug-window-start nil)
;; Remember where each buffers' window starts between edebug calls.
;; This is to avoid spurious recentering.
;; Does this still need to be buffer-local??
;;(setq-default edebug-window-start nil)
-;;(make-variable-buffer-local 'edebug-window-start)
;; Dynamically declared unbound vars
diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el
index 6db1bbbb224..294aba66c3a 100644
--- a/lisp/emacs-lisp/generic.el
+++ b/lisp/emacs-lisp/generic.el
@@ -96,9 +96,8 @@
;; Internal Variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar generic-font-lock-keywords nil
+(defvar-local generic-font-lock-keywords nil
"Keywords for `font-lock-defaults' in a generic mode.")
-(make-variable-buffer-local 'generic-font-lock-keywords)
;;;###autoload
(defvar generic-mode-list nil
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 3918fa01b2a..c96d849d442 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -775,7 +775,6 @@ or to switch back to an existing one."
(setq-local find-tag-default-function 'lisp-find-tag-default)
(setq-local comment-start-skip
"\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\)\\(;+\\|#|\\) *")
- (setq-local comment-end "|#")
(setq imenu-case-fold-search t))
(defun lisp-find-tag-default ()
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 23221a2a00d..ce8d98df807 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -187,14 +187,14 @@ Set it to nil if you don't want limits here."
(defvar reb-target-window nil
"Window to which the RE is applied to.")
-(defvar reb-regexp nil
+(defvar-local reb-regexp nil
"Last regexp used by RE Builder.")
-(defvar reb-regexp-src nil
+(defvar-local reb-regexp-src nil
"Last regexp used by RE Builder before processing it.
Except for Lisp syntax this is the same as `reb-regexp'.")
-(defvar reb-overlays nil
+(defvar-local reb-overlays nil
"List of overlays of the RE Builder.")
(defvar reb-window-config nil
@@ -212,10 +212,6 @@ Except for Lisp syntax this is the same as `reb-regexp'.")
(defvar reb-valid-string ""
"String in mode line showing validity of RE.")
-(make-variable-buffer-local 'reb-overlays)
-(make-variable-buffer-local 'reb-regexp)
-(make-variable-buffer-local 'reb-regexp-src)
-
(defconst reb-buffer "*RE-Builder*"
"Buffer to use for the RE Builder.")
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index 62f213c57f7..bee2f9639e7 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -75,7 +75,7 @@ properties won't work properly.")
(defvar syntax-propertize-chunk-size 500)
-(defvar syntax-propertize-extend-region-functions
+(defvar-local syntax-propertize-extend-region-functions
'(syntax-propertize-wholelines)
"Special hook run just before proceeding to propertize a region.
This is used to allow major modes to help `syntax-propertize' find safe buffer
@@ -89,7 +89,6 @@ These functions are run in turn repeatedly until they all return nil.
Put first the functions more likely to cause a change and cheaper to compute.")
;; Mark it as a special hook which doesn't use any global setting
;; (i.e. doesn't obey the element t in the buffer-local value).
-(make-variable-buffer-local 'syntax-propertize-extend-region-functions)
(cl-defstruct (ppss
(:constructor make-ppss)
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 881eff7f801..a64274bc0c1 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -634,9 +634,8 @@ a cons (TYPE . COLOR), then both properties are affected."
;;; Low-level Interface
-(defvar cua-inhibit-cua-keys nil
+(defvar-local cua-inhibit-cua-keys nil
"Buffer-local variable that may disable the CUA keymappings.")
-(make-variable-buffer-local 'cua-inhibit-cua-keys)
;;; Aux. variables
@@ -644,9 +643,8 @@ a cons (TYPE . COLOR), then both properties are affected."
;; checked in post-command hook to see if point was moved
(defvar cua--buffer-and-point-before-command nil)
-;; status string for mode line indications
-(defvar cua--status-string nil)
-(make-variable-buffer-local 'cua--status-string)
+(defvar-local cua--status-string nil
+ "Status string for mode line indications.")
(defvar cua--debug nil)
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index ea5dad2aa0b..be2d7c0fd8a 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -37,7 +37,7 @@
(require 'rect)
-(defvar cua--rectangle nil
+(defvar-local cua--rectangle nil
"If non-nil, restrict current region to this rectangle.
A cua-rectangle definition is a vector used for all actions in
`cua-rectangle-mark-mode', of the form:
@@ -59,7 +59,6 @@ If VIRT is non-nil, virtual straight edges are enabled.
If SELECT is a regexp, only lines starting with that regexp are
affected.")
-(make-variable-buffer-local 'cua--rectangle)
(defvar cua--last-rectangle nil
"Most recent rectangle geometry.
@@ -85,9 +84,8 @@ See `cua--rectangle'.")
;; "active " "sert on" " straig" " lines ")
(defvar cua--last-killed-rectangle nil)
-(defvar cua--rectangle-overlays nil
+(defvar-local cua--rectangle-overlays nil
"List of overlays used to display current rectangle.")
-(make-variable-buffer-local 'cua--rectangle-overlays)
(put 'cua--rectangle-overlays 'permanent-local t)
(defvar cua--overlay-keymap
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 1e235831d6f..f38be908897 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -1624,7 +1624,7 @@ invokes the command before that, etc."
;; The following two functions are used to set up undo properly.
;; In VI, unlike Emacs, if you open a line, say, and add a bunch of lines,
;; they are undone all at once.
-(viper-deflocalvar viper--undo-change-group-handle nil)
+(defvar-local viper--undo-change-group-handle nil)
(put 'viper--undo-change-group-handle 'permanent-local t)
(defun viper-adjust-undo ()
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index cede99bff73..c05cf6a48b4 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -91,11 +91,9 @@ In all likelihood, you don't need to bother with this setting."
"Define VAR as a buffer-local variable.
DEFAULT-VALUE is the default value, and DOCUMENTATION is the
docstring. The variable becomes buffer-local whenever set."
- (declare (indent defun))
- `(progn
- (defvar ,var ,default-value
- ,(format "%s\n(buffer local)" documentation))
- (make-variable-buffer-local ',var)))
+ (declare (indent defun)
+ (obsolete defvar-local "28.1"))
+ `(defvar-local ,var ,default-value ,documentation))
;; (viper-loop COUNT BODY) Execute BODY COUNT times.
(defmacro viper-loop (count &rest body)
@@ -161,87 +159,87 @@ docstring. The variable becomes buffer-local whenever set."
;;; Viper minor modes
;; Mode for vital things like \e, C-z.
-(viper-deflocalvar viper-vi-intercept-minor-mode nil)
+(defvar-local viper-vi-intercept-minor-mode nil)
-(viper-deflocalvar viper-vi-basic-minor-mode nil
+(defvar-local viper-vi-basic-minor-mode nil
"Viper's minor mode for Vi bindings.")
-(viper-deflocalvar viper-vi-local-user-minor-mode nil
+(defvar-local viper-vi-local-user-minor-mode nil
"Auxiliary minor mode for user-defined local bindings in Vi state.")
-(viper-deflocalvar viper-vi-global-user-minor-mode nil
+(defvar-local viper-vi-global-user-minor-mode nil
"Auxiliary minor mode for user-defined global bindings in Vi state.")
-(viper-deflocalvar viper-vi-state-modifier-minor-mode nil
+(defvar-local viper-vi-state-modifier-minor-mode nil
"Minor mode used to make major-mode-specific modification to Vi state.")
-(viper-deflocalvar viper-vi-diehard-minor-mode nil
+(defvar-local viper-vi-diehard-minor-mode nil
"This minor mode is in effect when the user wants Viper to be Vi.")
-(viper-deflocalvar viper-vi-kbd-minor-mode nil
+(defvar-local viper-vi-kbd-minor-mode nil
"Minor mode for Ex command macros in Vi state.
The corresponding keymap stores key bindings of Vi macros defined with
the Ex command :map.")
;; Mode for vital things like \e, C-z.
-(viper-deflocalvar viper-insert-intercept-minor-mode nil)
+(defvar-local viper-insert-intercept-minor-mode nil)
-(viper-deflocalvar viper-insert-basic-minor-mode nil
+(defvar-local viper-insert-basic-minor-mode nil
"Viper's minor mode for bindings in Insert mode.")
-(viper-deflocalvar viper-insert-local-user-minor-mode nil
+(defvar-local viper-insert-local-user-minor-mode nil
"Auxiliary minor mode for buffer-local user-defined bindings in Insert state.
This is a way to overshadow normal Insert mode bindings locally to certain
designated buffers.")
-(viper-deflocalvar viper-insert-global-user-minor-mode nil
+(defvar-local viper-insert-global-user-minor-mode nil
"Auxiliary minor mode for global user-defined bindings in Insert state.")
-(viper-deflocalvar viper-insert-state-modifier-minor-mode nil
+(defvar-local viper-insert-state-modifier-minor-mode nil
"Minor mode used to make major-mode-specific modification to Insert state.")
-(viper-deflocalvar viper-insert-diehard-minor-mode nil
+(defvar-local viper-insert-diehard-minor-mode nil
"Minor mode that simulates Vi very closely.
Not recommended, except for the novice user.")
-(viper-deflocalvar viper-insert-kbd-minor-mode nil
+(defvar-local viper-insert-kbd-minor-mode nil
"Minor mode for Ex command macros Insert state.
The corresponding keymap stores key bindings of Vi macros defined with
the Ex command :map!.")
-(viper-deflocalvar viper-replace-minor-mode nil
+(defvar-local viper-replace-minor-mode nil
"Minor mode in effect in replace state (cw, C, and the like commands).")
;; Mode for vital things like \C-z and \C-x) This is set to t, when viper-mode
;; is invoked. So, any new buffer will have C-z defined as switch to Vi,
;; unless we switched states in this buffer
-(viper-deflocalvar viper-emacs-intercept-minor-mode nil)
+(defvar-local viper-emacs-intercept-minor-mode nil)
-(viper-deflocalvar viper-emacs-local-user-minor-mode nil
+(defvar-local viper-emacs-local-user-minor-mode nil
"Minor mode for local user bindings effective in Emacs state.
Users can use it to override Emacs bindings when Viper is in its Emacs
state.")
-(viper-deflocalvar viper-emacs-global-user-minor-mode nil
+(defvar-local viper-emacs-global-user-minor-mode nil
"Minor mode for global user bindings in effect in Emacs state.
Users can use it to override Emacs bindings when Viper is in its Emacs
state.")
-(viper-deflocalvar viper-emacs-kbd-minor-mode nil
+(defvar-local viper-emacs-kbd-minor-mode nil
"Minor mode for Vi style macros in Emacs state.
The corresponding keymap stores key bindings of Vi macros defined with
`viper-record-kbd-macro' command. There is no Ex-level command to do this
interactively.")
-(viper-deflocalvar viper-emacs-state-modifier-minor-mode nil
+(defvar-local viper-emacs-state-modifier-minor-mode nil
"Minor mode used to make major-mode-specific modification to Emacs state.
For instance, a Vi purist may want to bind `dd' in Dired mode to a function
that deletes a file.")
-(viper-deflocalvar viper-vi-minibuffer-minor-mode nil
+(defvar-local viper-vi-minibuffer-minor-mode nil
"Minor mode that forces Vi-style when the Minibuffer is in Vi state.")
-(viper-deflocalvar viper-insert-minibuffer-minor-mode nil
+(defvar-local viper-insert-minibuffer-minor-mode nil
"Minor mode that forces Vi-style when the Minibuffer is in Insert state.")
@@ -284,7 +282,7 @@ Use `\\[viper-set-expert-level]' to change this.")
;; If non-nil, ISO accents will be turned on in insert/replace emacs states and
;; turned off in vi-state. For some users, this behavior may be too
;; primitive. In this case, use insert/emacs/vi state hooks.
-(viper-deflocalvar viper-automatic-iso-accents nil "")
+(defvar-local viper-automatic-iso-accents nil "")
;; Set iso-accents-mode to ARG. Check if it is bound first
(defsubst viper-set-iso-accents-mode (arg)
(if (boundp 'iso-accents-mode)
@@ -294,7 +292,7 @@ Use `\\[viper-set-expert-level]' to change this.")
;; Don't change this!
(defvar viper-mule-hook-flag t)
;; If non-nil, the default intl. input method is turned on.
-(viper-deflocalvar viper-special-input-method nil "")
+(defvar-local viper-special-input-method nil "")
;; viper hook to run on input-method activation
(defun viper-activate-input-method-action ()
@@ -357,7 +355,7 @@ it better fits your working style."
;; Replace mode and changing text
;; Hack used to pass global states around for short period of time
-(viper-deflocalvar viper-intermediate-command nil "")
+(defvar-local viper-intermediate-command nil "")
;; This is used to pass the right Vi command key sequence to
;; viper-set-destructive-command whenever (this-command-keys) doesn't give the
@@ -367,7 +365,7 @@ it better fits your working style."
(defconst viper-this-command-keys nil)
;; Indicates that the current destructive command has started in replace mode.
-(viper-deflocalvar viper-began-as-replace nil "")
+(defvar-local viper-began-as-replace nil "")
(defcustom viper-allow-multiline-replace-regions t
"If non-nil, Viper will allow multi-line replace regions.
@@ -398,7 +396,7 @@ delete the text being replaced, as in standard Vi."
;; internal var, used to remember the default cursor color of emacs frames
(defvar viper-vi-state-cursor-color nil)
-(viper-deflocalvar viper-replace-overlay nil "")
+(defvar-local viper-replace-overlay nil "")
(put 'viper-replace-overlay 'permanent-local t)
(defcustom viper-replace-region-end-delimiter "$"
@@ -430,24 +428,24 @@ color displays. By default, the delimiters are used only on TTYs."
;; `viper-move-marker-locally'
;;
;; Remember the last position inside the replace region.
-(viper-deflocalvar viper-last-posn-in-replace-region nil)
+(defvar-local viper-last-posn-in-replace-region nil)
;; Remember the last position while inserting
-(viper-deflocalvar viper-last-posn-while-in-insert-state nil)
+(defvar-local viper-last-posn-while-in-insert-state nil)
(put 'viper-last-posn-in-replace-region 'permanent-local t)
(put 'viper-last-posn-while-in-insert-state 'permanent-local t)
-(viper-deflocalvar viper-sitting-in-replace nil "")
+(defvar-local viper-sitting-in-replace nil "")
(put 'viper-sitting-in-replace 'permanent-local t)
;; Remember the number of characters that have to be deleted in replace
;; mode to compensate for the inserted characters.
-(viper-deflocalvar viper-replace-chars-to-delete 0 "")
+(defvar-local viper-replace-chars-to-delete 0 "")
;; This variable is used internally by the before/after changed functions to
;; determine how many chars were deleted by the change. This can't be
;; determined inside after-change-functions because those get the length of the
;; deleted region, not the number of chars deleted (which are two different
;; things under MULE).
-(viper-deflocalvar viper-replace-region-chars-deleted 0 "")
+(defvar-local viper-replace-region-chars-deleted 0 "")
;; Insertion ring and command ring
(defcustom viper-insertion-ring-size 14
@@ -490,28 +488,28 @@ will make it hard to use Vi-style timeout macros."
;; Modes and related variables
;; Current mode. One of: `emacs-state', `vi-state', `insert-state'
-(viper-deflocalvar viper-current-state 'emacs-state)
+(defvar-local viper-current-state 'emacs-state)
;; Autoindent in insert
;; Variable that keeps track of whether C-t has been pressed.
-(viper-deflocalvar viper-cted nil "")
+(defvar-local viper-cted nil "")
;; Preserve the indent value, used by C-d in insert mode.
-(viper-deflocalvar viper-current-indent 0)
+(defvar-local viper-current-indent 0)
;; Whether to preserve the indent, used by C-d in insert mode.
-(viper-deflocalvar viper-preserve-indent nil)
+(defvar-local viper-preserve-indent nil)
-(viper-deflocalvar viper-auto-indent nil "")
+(defvar-local viper-auto-indent nil "")
(defcustom viper-auto-indent nil
"Enable autoindent, if t.
This is a buffer-local variable."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-electric-mode t "")
+(defvar-local viper-electric-mode t "")
(defcustom viper-electric-mode t
"If t, electrify Viper.
Currently, this only electrifies auto-indentation, making it appropriate to the
@@ -541,7 +539,7 @@ to a new place after repeating previous Vi command."
;; Remember insert point as a marker. This is a local marker that must be
;; initialized to nil and moved with `viper-move-marker-locally'.
-(viper-deflocalvar viper-insert-point nil)
+(defvar-local viper-insert-point nil)
(put 'viper-insert-point 'permanent-local t)
;; This remembers the point before dabbrev-expand was called.
@@ -562,7 +560,7 @@ to a new place after repeating previous Vi command."
;; problem. However, the same trick can be used if such a command is
;; discovered later.
;;
-(viper-deflocalvar viper-pre-command-point nil)
+(defvar-local viper-pre-command-point nil)
(put 'viper-pre-command-point 'permanent-local t) ; this is probably an overkill
;; This is used for saving inserted text.
@@ -573,7 +571,7 @@ to a new place after repeating previous Vi command."
;; Remember com point as a marker.
;; This is a local marker. Should be moved with `viper-move-marker-locally'
-(viper-deflocalvar viper-com-point nil)
+(defvar-local viper-com-point nil)
;; If non-nil, the value is a list (M-COM VAL COM REG inserted-text cmd-keys)
;; It is used to re-execute last destructive command.
@@ -660,14 +658,14 @@ negative number."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-ex-style-motion t "")
+(defvar-local viper-ex-style-motion t "")
(defcustom viper-ex-style-motion t
"If t, the commands l,h do not cross lines, etc (Ex-style).
If nil, these commands cross line boundaries."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-ex-style-editing t "")
+(defvar-local viper-ex-style-editing t "")
(defcustom viper-ex-style-editing t
"If t, Ex-style behavior while editing in Vi command and insert states.
`Backspace' and `Delete' don't cross line boundaries in insert.
@@ -679,14 +677,14 @@ If nil, the above commands can work across lines."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-ESC-moves-cursor-back viper-ex-style-editing "")
+(defvar-local viper-ESC-moves-cursor-back viper-ex-style-editing "")
(defcustom viper-ESC-moves-cursor-back nil
"If t, ESC moves cursor back when changing from insert to vi state.
If nil, the cursor stays where it was when ESC was hit."
:type 'boolean
:group 'viper)
-(viper-deflocalvar viper-delete-backwards-in-replace nil "")
+(defvar-local viper-delete-backwards-in-replace nil "")
(defcustom viper-delete-backwards-in-replace nil
"If t, DEL key will delete characters while moving the cursor backwards.
If nil, the cursor will move backwards without deleting anything."
@@ -704,7 +702,7 @@ If nil, the cursor will move backwards without deleting anything."
:tag "Search Wraps Around"
:group 'viper-search)
-(viper-deflocalvar viper-related-files-and-buffers-ring nil "")
+(defvar-local viper-related-files-and-buffers-ring nil "")
(defcustom viper-related-files-and-buffers-ring nil
"List of file and buffer names to consider related to the current buffer.
Related buffers can be cycled through via :R and :P commands."
@@ -713,12 +711,12 @@ Related buffers can be cycled through via :R and :P commands."
(put 'viper-related-files-and-buffers-ring 'permanent-local t)
;; Used to find out if we are done with searching the current buffer.
-(viper-deflocalvar viper-local-search-start-marker nil)
+(defvar-local viper-local-search-start-marker nil)
;; As above, but global
(defvar viper-search-start-marker (make-marker))
;; the search overlay
-(viper-deflocalvar viper-search-overlay nil)
+(defvar-local viper-search-overlay nil)
(defvar viper-heading-start
@@ -745,9 +743,9 @@ Related buffers can be cycled through via :R and :P commands."
;; inside the lines.
;; Remembers position of the last jump done using ``'.
-(viper-deflocalvar viper-last-jump nil)
+(defvar-local viper-last-jump nil)
;; Remembers position of the last jump done using `''.
-(viper-deflocalvar viper-last-jump-ignore 0)
+(defvar-local viper-last-jump-ignore 0)
;; History variables
@@ -841,7 +839,7 @@ to customize the actual face object `viper-minibuffer-vi'
this variable represents.")
;; the current face to be used in the minibuffer
-(viper-deflocalvar
+(defvar-local
viper-minibuffer-current-face viper-minibuffer-emacs-face "")
@@ -877,7 +875,7 @@ Should be set in `viper-custom-file-name'."
:group 'viper)
;; overlay used in the minibuffer to indicate which state it is in
-(viper-deflocalvar viper-minibuffer-overlay nil)
+(defvar-local viper-minibuffer-overlay nil)
(put 'viper-minibuffer-overlay 'permanent-local t)
;; Hook, specific to Viper, which is run just *before* exiting the minibuffer.
@@ -946,9 +944,4 @@ on a dumb terminal."
(provide 'viper-init)
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
;;; viper-init.el ends here
diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el
index 7209dc664b5..1d80c9cd026 100644
--- a/lisp/emulation/viper-keym.el
+++ b/lisp/emulation/viper-keym.el
@@ -82,7 +82,7 @@ major mode in effect."
(defvar viper-insert-intercept-map (make-sparse-keymap))
(defvar viper-emacs-intercept-map (make-sparse-keymap))
-(viper-deflocalvar viper-vi-local-user-map (make-sparse-keymap)
+(defvar-local viper-vi-local-user-map (make-sparse-keymap)
"Keymap for user-defined local bindings.
Useful for changing bindings such as ZZ in certain major modes.
For instance, in letter-mode, one may want to bind ZZ to
@@ -106,7 +106,7 @@ This map is global, shared by all buffers.")
This happens when viper-expert-level is 1 or 2. See viper-set-expert-level.")
-(viper-deflocalvar viper-insert-local-user-map (make-sparse-keymap)
+(defvar-local viper-insert-local-user-map (make-sparse-keymap)
"Auxiliary map for per-buffer user-defined keybindings in Insert state.")
(put 'viper-insert-local-user-map 'permanent-local t)
@@ -133,7 +133,7 @@ viper-insert-basic-map. Not recommended, except for novice users.")
(defvar viper-emacs-kbd-map (make-sparse-keymap)
"This keymap keeps Vi-style kbd macros for Emacs mode.")
-(viper-deflocalvar viper-emacs-local-user-map (make-sparse-keymap)
+(defvar-local viper-emacs-local-user-map (make-sparse-keymap)
"Auxiliary map for local user-defined bindings in Emacs state.")
(put 'viper-emacs-local-user-map 'permanent-local t)
@@ -209,22 +209,22 @@ In insert mode, this key also functions as Meta."
(defvar viper-emacs-state-modifier-alist nil)
;; The list of viper keymaps. Set by viper-normalize-minor-mode-map-alist
-(viper-deflocalvar viper--key-maps nil)
-(viper-deflocalvar viper--intercept-key-maps nil)
+(defvar-local viper--key-maps nil)
+(defvar-local viper--intercept-key-maps nil)
;; Tells viper-add-local-keys to create a new viper-vi-local-user-map for new
;; buffers. Not a user option.
-(viper-deflocalvar viper-need-new-vi-local-map t "")
+(defvar-local viper-need-new-vi-local-map t "")
(put 'viper-need-new-vi-local-map 'permanent-local t)
;; Tells viper-add-local-keys to create a new viper-insert-local-user-map for
;; new buffers. Not a user option.
-(viper-deflocalvar viper-need-new-insert-local-map t "")
+(defvar-local viper-need-new-insert-local-map t "")
(put 'viper-need-new-insert-local-map 'permanent-local t)
;; Tells viper-add-local-keys to create a new viper-emacs-local-user-map for
;; new buffers. Not a user option.
-(viper-deflocalvar viper-need-new-emacs-local-map t "")
+(defvar-local viper-need-new-emacs-local-map t "")
(put 'viper-need-new-emacs-local-map 'permanent-local t)
@@ -654,10 +654,4 @@ form ((key . function) (key . function) ... )."
(provide 'viper-keym)
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
-
;;; viper-keym.el ends here
diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el
index eec83dd05b5..71e40ee023e 100644
--- a/lisp/emulation/viper-mous.el
+++ b/lisp/emulation/viper-mous.el
@@ -74,10 +74,10 @@ considered related."
:group 'viper-mouse)
;; Local variable used to toggle wraparound search on click.
-(viper-deflocalvar viper-mouse-click-search-noerror t)
+(defvar-local viper-mouse-click-search-noerror t)
;; Local variable used to delimit search after wraparound.
-(viper-deflocalvar viper-mouse-click-search-limit nil)
+(defvar-local viper-mouse-click-search-limit nil)
;; remembers prefix argument to pass along to commands invoked by second
;; click.
@@ -592,11 +592,4 @@ This buffer may be different from the one where the click occurred."
:set 'viper-reset-mouse-insert-key
:group 'viper-mouse)
-
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
-
;;; viper-mous.el ends here
diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el
index 07a234bab9b..1bdb155538a 100644
--- a/lisp/emulation/viper-util.el
+++ b/lisp/emulation/viper-util.el
@@ -1085,10 +1085,10 @@ the `Local variables' section of a file."
;; These are characters that are not to be considered as parts of a word in
;; Viper.
;; Set each time state changes and at loading time
-(viper-deflocalvar viper-non-word-characters nil)
+(defvar-local viper-non-word-characters nil)
;; must be buffer-local
-(viper-deflocalvar viper-ALPHA-char-class "w"
+(defvar-local viper-ALPHA-char-class "w"
"String of syntax classes characterizing Viper's alphanumeric symbols.
In addition, the symbol `_' may be considered alphanumeric if
`viper-syntax-preference' is `strict-vi' or `reformed-vi'.")
@@ -1375,10 +1375,4 @@ This option is appropriate if you like Emacs-style words."
(setq i (1+ i) start (1+ start)))
res))))))
-
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
;;; viper-util.el ends here
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 6c9428060fc..df5a083a08a 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -1256,9 +1256,4 @@ These two lines must come in the order given."))
(provide 'viper)
-
-;; Local Variables:
-;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun)
-;; End:
-
;;; viper.el ends here
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 487dc7692ef..4cabd42f532 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -120,38 +120,31 @@
;;; User data
-(defvar erc-server-current-nick nil
+(defvar-local erc-server-current-nick nil
"Nickname on the current server.
Use `erc-current-nick' to access this.")
-(make-variable-buffer-local 'erc-server-current-nick)
;;; Server attributes
-(defvar erc-server-process nil
+(defvar-local erc-server-process nil
"The process object of the corresponding server connection.")
-(make-variable-buffer-local 'erc-server-process)
-(defvar erc-session-server nil
+(defvar-local erc-session-server nil
"The server name used to connect to for this session.")
-(make-variable-buffer-local 'erc-session-server)
-(defvar erc-session-connector nil
+(defvar-local erc-session-connector nil
"The function used to connect to this session (nil for the default).")
-(make-variable-buffer-local 'erc-session-connector)
-(defvar erc-session-port nil
+(defvar-local erc-session-port nil
"The port used to connect to.")
-(make-variable-buffer-local 'erc-session-port)
-(defvar erc-server-announced-name nil
+(defvar-local erc-server-announced-name nil
"The name the server announced to use.")
-(make-variable-buffer-local 'erc-server-announced-name)
-(defvar erc-server-version nil
+(defvar-local erc-server-version nil
"The name and version of the server's ircd.")
-(make-variable-buffer-local 'erc-server-version)
-(defvar erc-server-parameters nil
+(defvar-local erc-server-parameters nil
"Alist listing the supported server parameters.
This is only set if the server sends 005 messages saying what is
@@ -177,86 +170,70 @@ RFC2812 - server supports RFC 2812 features
SILENCE=10 - supports the SILENCE command, maximum allowed number of entries
TOPICLEN=160 - maximum allowed topic length
WALLCHOPS - supports sending messages to all operators in a channel")
-(make-variable-buffer-local 'erc-server-parameters)
;;; Server and connection state
(defvar erc-server-ping-timer-alist nil
"Mapping of server buffers to their specific ping timer.")
-(defvar erc-server-connected nil
+(defvar-local erc-server-connected nil
"Non-nil if the current buffer has been used by ERC to establish
an IRC connection.
If you wish to determine whether an IRC connection is currently
active, use the `erc-server-process-alive' function instead.")
-(make-variable-buffer-local 'erc-server-connected)
-(defvar erc-server-reconnect-count 0
+(defvar-local erc-server-reconnect-count 0
"Number of times we have failed to reconnect to the current server.")
-(make-variable-buffer-local 'erc-server-reconnect-count)
-(defvar erc-server-quitting nil
+(defvar-local erc-server-quitting nil
"Non-nil if the user requests a quit.")
-(make-variable-buffer-local 'erc-server-quitting)
-(defvar erc-server-reconnecting nil
+(defvar-local erc-server-reconnecting nil
"Non-nil if the user requests an explicit reconnect, and the
current IRC process is still alive.")
-(make-variable-buffer-local 'erc-server-reconnecting)
-(defvar erc-server-timed-out nil
+(defvar-local erc-server-timed-out nil
"Non-nil if the IRC server failed to respond to a ping.")
-(make-variable-buffer-local 'erc-server-timed-out)
-(defvar erc-server-banned nil
+(defvar-local erc-server-banned nil
"Non-nil if the user is denied access because of a server ban.")
-(make-variable-buffer-local 'erc-server-banned)
-(defvar erc-server-error-occurred nil
+(defvar-local erc-server-error-occurred nil
"Non-nil if the user triggers some server error.")
-(make-variable-buffer-local 'erc-server-error-occurred)
-(defvar erc-server-lines-sent nil
+(defvar-local erc-server-lines-sent nil
"Line counter.")
-(make-variable-buffer-local 'erc-server-lines-sent)
-(defvar erc-server-last-peers '(nil . nil)
+(defvar-local erc-server-last-peers '(nil . nil)
"Last peers used, both sender and receiver.
Those are used for /MSG destination shortcuts.")
-(make-variable-buffer-local 'erc-server-last-peers)
-(defvar erc-server-last-sent-time nil
+(defvar-local erc-server-last-sent-time nil
"Time the message was sent.
This is useful for flood protection.")
-(make-variable-buffer-local 'erc-server-last-sent-time)
-(defvar erc-server-last-ping-time nil
+(defvar-local erc-server-last-ping-time nil
"Time the last ping was sent.
This is useful for flood protection.")
-(make-variable-buffer-local 'erc-server-last-ping-time)
-(defvar erc-server-last-received-time nil
+(defvar-local erc-server-last-received-time nil
"Time the last message was received from the server.
This is useful for detecting hung connections.")
-(make-variable-buffer-local 'erc-server-last-received-time)
-(defvar erc-server-lag nil
+(defvar-local erc-server-lag nil
"Calculated server lag time in seconds.
This variable is only set in a server buffer.")
-(make-variable-buffer-local 'erc-server-lag)
-(defvar erc-server-filter-data nil
+(defvar-local erc-server-filter-data nil
"The data that arrived from the server
but has not been processed yet.")
-(make-variable-buffer-local 'erc-server-filter-data)
-(defvar erc-server-duplicates (make-hash-table :test 'equal)
+(defvar-local erc-server-duplicates (make-hash-table :test 'equal)
"Internal variable used to track duplicate messages.")
-(make-variable-buffer-local 'erc-server-duplicates)
;; From Circe
-(defvar erc-server-processing-p nil
+(defvar-local erc-server-processing-p nil
"Non-nil when we're currently processing a message.
When ERC receives a private message, it sets up a new buffer for
@@ -267,23 +244,19 @@ network exceptions. So, if someone sends you two messages
quickly after each other, ispell is started for the first, but
might take long enough for the second message to be processed
first.")
-(make-variable-buffer-local 'erc-server-processing-p)
-(defvar erc-server-flood-last-message 0
+(defvar-local erc-server-flood-last-message 0
"When we sent the last message.
See `erc-server-flood-margin' for an explanation of the flood
protection algorithm.")
-(make-variable-buffer-local 'erc-server-flood-last-message)
-(defvar erc-server-flood-queue nil
+(defvar-local erc-server-flood-queue nil
"The queue of messages waiting to be sent to the server.
See `erc-server-flood-margin' for an explanation of the flood
protection algorithm.")
-(make-variable-buffer-local 'erc-server-flood-queue)
-(defvar erc-server-flood-timer nil
+(defvar-local erc-server-flood-timer nil
"The timer to resume sending.")
-(make-variable-buffer-local 'erc-server-flood-timer)
;;; IRC protocol and misc options
@@ -453,9 +426,8 @@ If this is set to nil, never try to reconnect."
:type '(choice (const :tag "Disabled" nil)
(integer :tag "Seconds")))
-(defvar erc-server-ping-handler nil
+(defvar-local erc-server-ping-handler nil
"This variable holds the periodic ping timer.")
-(make-variable-buffer-local 'erc-server-ping-handler)
;;;; Helper functions
diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el
index 06d4fbd9f6a..4e4d012545a 100644
--- a/lisp/erc/erc-capab.el
+++ b/lisp/erc/erc-capab.el
@@ -113,13 +113,11 @@ character not found in IRC nicknames to avoid confusion."
;;; Variables:
-(defvar erc-capab-identify-activated nil
+(defvar-local erc-capab-identify-activated nil
"CAPAB IDENTIFY-MSG has been activated.")
-(make-variable-buffer-local 'erc-capab-identify-activated)
-(defvar erc-capab-identify-sent nil
+(defvar-local erc-capab-identify-sent nil
"CAPAB IDENTIFY-MSG and IDENTIFY-CTCP messages have been sent.")
-(make-variable-buffer-local 'erc-capab-identify-sent)
;;; Functions:
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index 590785e91c2..9dedd3cda86 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -538,8 +538,7 @@ PROC is the server process."
nil '(notice error) 'active
'dcc-get-notfound ?n nick ?f filename))))
-(defvar erc-dcc-byte-count nil)
-(make-variable-buffer-local 'erc-dcc-byte-count)
+(defvar-local erc-dcc-byte-count nil)
(defun erc-dcc-do-LIST-command (proc)
"This is the handler for the /dcc list command.
@@ -751,9 +750,8 @@ the matching regexp, or nil if none found."
'dcc-malformed ?n nick ?u login ?h host ?q query)))))
-(defvar erc-dcc-entry-data nil
+(defvar-local erc-dcc-entry-data nil
"Holds the `erc-dcc-list' entry for this DCC connection.")
-(make-variable-buffer-local 'erc-dcc-entry-data)
;;; SEND handling
@@ -905,8 +903,7 @@ other client."
:group 'erc-dcc
:type 'integer)
-(defvar erc-dcc-file-name nil)
-(make-variable-buffer-local 'erc-dcc-file-name)
+(defvar-local erc-dcc-file-name nil)
(defun erc-dcc-get-file (entry file parent-proc)
"Set up a transfer from the remote client to the local over a TCP connection.
diff --git a/lisp/erc/erc-ezbounce.el b/lisp/erc/erc-ezbounce.el
index 62238dd4344..8378ff53742 100644
--- a/lisp/erc/erc-ezbounce.el
+++ b/lisp/erc/erc-ezbounce.el
@@ -61,9 +61,8 @@ The alist's format is as follows:
"Alist of actions to take on NOTICEs from EZBounce.")
-(defvar erc-ezb-session-list '()
+(defvar-local erc-ezb-session-list '()
"List of detached EZBounce sessions.")
-(make-variable-buffer-local 'erc-ezb-session-list)
(defvar erc-ezb-inside-session-listing nil
"Indicate whether current notices are expected to be EZB session listings.")
diff --git a/lisp/erc/erc-join.el b/lisp/erc/erc-join.el
index 947b2949690..e6e50707830 100644
--- a/lisp/erc/erc-join.el
+++ b/lisp/erc/erc-join.el
@@ -105,8 +105,7 @@ servers, presumably in the same domain."
:group 'erc-autojoin
:type 'boolean)
-(defvar erc--autojoin-timer nil)
-(make-variable-buffer-local 'erc--autojoin-timer)
+(defvar-local erc--autojoin-timer nil)
(defun erc-autojoin-channels-delayed (server nick buffer)
"Attempt to autojoin channels.
diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el
index 9fd3cfe1cc4..37fc4cf16c1 100644
--- a/lisp/erc/erc-netsplit.el
+++ b/lisp/erc/erc-netsplit.el
@@ -82,12 +82,11 @@ Args: PROC is the process the netjoin originated from and
:group 'erc-hooks
:type 'hook)
-(defvar erc-netsplit-list nil
+(defvar-local erc-netsplit-list nil
"This is a list of the form
\((\"a.b.c.d e.f.g\" TIMESTAMP FIRST-JOIN \"nick1\" ... \"nickn\") ...)
where FIRST-JOIN is t or nil, depending on whether or not the first
join from that split has been detected or not.")
-(make-variable-buffer-local 'erc-netsplit-list)
(defun erc-netsplit-install-message-catalogs ()
(erc-define-catalog
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el
index 9c2bb9dfee3..9926255e3aa 100644
--- a/lisp/erc/erc-networks.el
+++ b/lisp/erc/erc-networks.el
@@ -722,9 +722,8 @@ MATCHER is used to find a corresponding network to a server while
(regexp)
(const :tag "Network has no common server ending" nil)))))
-(defvar erc-network nil
+(defvar-local erc-network nil
"The name of the network you are connected to (a symbol).")
-(make-variable-buffer-local 'erc-network)
;; Functions:
diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el
index 098049edc68..e133e05a7d3 100644
--- a/lisp/erc/erc-notify.el
+++ b/lisp/erc/erc-notify.el
@@ -75,13 +75,11 @@ strings."
;;;; Internal variables
-(defvar erc-last-ison nil
+(defvar-local erc-last-ison nil
"Last ISON information received through `erc-notify-timer'.")
-(make-variable-buffer-local 'erc-last-ison)
-(defvar erc-last-ison-time 0
+(defvar-local erc-last-ison-time 0
"Last time ISON was sent to the server in `erc-notify-timer'.")
-(make-variable-buffer-local 'erc-last-ison-time)
;;;; Setup
diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el
index 3813eafe004..71a9f8ef3da 100644
--- a/lisp/erc/erc-ring.el
+++ b/lisp/erc/erc-ring.el
@@ -53,16 +53,14 @@ be recalled using M-p and M-n."
(define-key erc-mode-map "\M-p" 'undefined)
(define-key erc-mode-map "\M-n" 'undefined)))
-(defvar erc-input-ring nil "Input ring for erc.")
-(make-variable-buffer-local 'erc-input-ring)
+(defvar-local erc-input-ring nil "Input ring for erc.")
-(defvar erc-input-ring-index nil
+(defvar-local erc-input-ring-index nil
"Position in the input ring for erc.
If nil, the input line is blank and the user is conceptually after
the most recently added item in the ring. If an integer, the input
line is non-blank and displays the item from the ring indexed by this
variable.")
-(make-variable-buffer-local 'erc-input-ring-index)
(defun erc-input-ring-setup ()
"Do the setup required so that we can use comint style input rings.
diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el
index c7dfb0807bc..2c42a18081e 100644
--- a/lisp/erc/erc-stamp.el
+++ b/lisp/erc/erc-stamp.el
@@ -191,21 +191,18 @@ or `erc-send-modify-hook'."
(list (lambda (_window _before dir)
(erc-echo-timestamp dir ct))))))))
-(defvar erc-timestamp-last-inserted nil
+(defvar-local erc-timestamp-last-inserted nil
"Last timestamp inserted into the buffer.")
-(make-variable-buffer-local 'erc-timestamp-last-inserted)
-(defvar erc-timestamp-last-inserted-left nil
+(defvar-local erc-timestamp-last-inserted-left nil
"Last timestamp inserted into the left side of the buffer.
This is used when `erc-insert-timestamp-function' is set to
`erc-timestamp-left-and-right'")
-(make-variable-buffer-local 'erc-timestamp-last-inserted-left)
-(defvar erc-timestamp-last-inserted-right nil
+(defvar-local erc-timestamp-last-inserted-right nil
"Last timestamp inserted into the right side of the buffer.
This is used when `erc-insert-timestamp-function' is set to
`erc-timestamp-left-and-right'")
-(make-variable-buffer-local 'erc-timestamp-last-inserted-right)
(defcustom erc-timestamp-only-if-changed-flag t
"Insert timestamp only if its value changed since last insertion.
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index bb68173b6dc..37e4cc39d53 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -270,9 +270,8 @@ A typical value would be \((\"#emacs\" \"QUIT\" \"JOIN\")
:group 'erc-ignore
:type 'erc-message-type)
-(defvar erc-session-password nil
+(defvar-local erc-session-password nil
"The password used for the current session.")
-(make-variable-buffer-local 'erc-session-password)
(defcustom erc-disconnected-hook nil
"Run this hook with arguments (NICK IP REASON) when disconnected.
@@ -337,18 +336,16 @@ Functions are passed a buffer as the first argument."
:type 'hook)
-(defvar erc-channel-users nil
+(defvar-local erc-channel-users nil
"A hash table of members in the current channel, which
associates nicknames with cons cells of the form:
\(USER . MEMBER-DATA) where USER is a pointer to an
erc-server-user struct, and MEMBER-DATA is a pointer to an
erc-channel-user struct.")
-(make-variable-buffer-local 'erc-channel-users)
-(defvar erc-server-users nil
+(defvar-local erc-server-users nil
"A hash table of users on the current server, which associates
nicknames with erc-server-user struct instances.")
-(make-variable-buffer-local 'erc-server-users)
(defun erc-downcase (string)
"Convert STRING to IRC standard conforming downcase."
@@ -632,23 +629,19 @@ See also: `erc-get-channel-user-list'."
(or (not nicky)
(string-lessp nickx nicky))))))))
-(defvar erc-channel-topic nil
+(defvar-local erc-channel-topic nil
"A topic string for the channel. Should only be used in channel-buffers.")
-(make-variable-buffer-local 'erc-channel-topic)
-(defvar erc-channel-modes nil
+(defvar-local erc-channel-modes nil
"List of strings representing channel modes.
E.g. (\"i\" \"m\" \"s\" \"b Quake!*@*\")
\(not sure the ban list will be here, but why not)")
-(make-variable-buffer-local 'erc-channel-modes)
-(defvar erc-insert-marker nil
+(defvar-local erc-insert-marker nil
"The place where insertion of new text in erc buffers should happen.")
-(make-variable-buffer-local 'erc-insert-marker)
-(defvar erc-input-marker nil
+(defvar-local erc-input-marker nil
"The marker where input should be inserted.")
-(make-variable-buffer-local 'erc-input-marker)
(defun erc-string-no-properties (string)
"Return a copy of STRING will all text-properties removed."
@@ -900,9 +893,8 @@ directory in the list."
:group 'erc-scripts
:type 'boolean)
-(defvar erc-last-saved-position nil
+(defvar-local erc-last-saved-position nil
"A marker containing the position the current buffer was last saved at.")
-(make-variable-buffer-local 'erc-last-saved-position)
(defcustom erc-kill-buffer-on-part nil
"Kill the channel buffer on PART.
@@ -1271,8 +1263,7 @@ See also `erc-show-my-nick'."
(defvar erc-debug-log-file (expand-file-name "ERC.debug")
"Debug log file name.")
-(defvar erc-dbuf nil)
-(make-variable-buffer-local 'erc-dbuf)
+(defvar-local erc-dbuf nil)
(defmacro define-erc-module (name alias doc enable-body disable-body
&optional local-p)
@@ -1462,11 +1453,10 @@ If BUFFER is nil, the current buffer is used."
;; Last active buffer, to print server messages in the right place
-(defvar erc-active-buffer nil
+(defvar-local erc-active-buffer nil
"The current active buffer, the one where the user typed the last command.
Defaults to the server buffer, and should only be set in the
server buffer.")
-(make-variable-buffer-local 'erc-active-buffer)
(defun erc-active-buffer ()
"Return the value of `erc-active-buffer' for the current server.
@@ -1820,52 +1810,41 @@ all channel buffers on all servers."
;; Some local variables
-(defvar erc-default-recipients nil
+(defvar-local erc-default-recipients nil
"List of default recipients of the current buffer.")
-(make-variable-buffer-local 'erc-default-recipients)
-(defvar erc-session-user-full-name nil
+(defvar-local erc-session-user-full-name nil
"Full name of the user on the current server.")
-(make-variable-buffer-local 'erc-session-user-full-name)
-(defvar erc-channel-user-limit nil
+(defvar-local erc-channel-user-limit nil
"Limit of users per channel.")
-(make-variable-buffer-local 'erc-channel-user-limit)
-(defvar erc-channel-key nil
+(defvar-local erc-channel-key nil
"Key needed to join channel.")
-(make-variable-buffer-local 'erc-channel-key)
-(defvar erc-invitation nil
+(defvar-local erc-invitation nil
"Last invitation channel.")
-(make-variable-buffer-local 'erc-invitation)
-(defvar erc-away nil
+(defvar-local erc-away nil
"Non-nil indicates that we are away.
Use `erc-away-time' to access this if you might be in a channel
buffer rather than a server buffer.")
-(make-variable-buffer-local 'erc-away)
-(defvar erc-channel-list nil
+(defvar-local erc-channel-list nil
"Server channel list.")
-(make-variable-buffer-local 'erc-channel-list)
-(defvar erc-bad-nick nil
+(defvar-local erc-bad-nick nil
"Non-nil indicates that we got a `nick in use' error while connecting.")
-(make-variable-buffer-local 'erc-bad-nick)
-(defvar erc-logged-in nil
+(defvar-local erc-logged-in nil
"Non-nil indicates that we are logged in.")
-(make-variable-buffer-local 'erc-logged-in)
-(defvar erc-default-nicks nil
+(defvar-local erc-default-nicks nil
"The local copy of `erc-nick' - the list of nicks to choose from.")
-(make-variable-buffer-local 'erc-default-nicks)
-(defvar erc-nick-change-attempt-count 0
+(defvar-local erc-nick-change-attempt-count 0
"Used to keep track of how many times an attempt at changing nick is made.")
-(make-variable-buffer-local 'erc-nick-change-attempt-count)
(defun erc-migrate-modules (mods)
"Migrate old names of ERC modules to new ones."
@@ -2764,8 +2743,7 @@ present."
(let ((prop-val (erc-get-parsed-vector position)))
(and prop-val (member (erc-response.command prop-val) list))))
-(defvar erc-send-input-line-function 'erc-send-input-line)
-(make-variable-buffer-local 'erc-send-input-line-function)
+(defvar-local erc-send-input-line-function 'erc-send-input-line)
(defun erc-send-input-line (target line &optional force)
"Send LINE to TARGET.
@@ -3181,12 +3159,11 @@ were most recently invited. See also `invitation'."
(defalias 'erc-cmd-CHANNEL 'erc-cmd-JOIN)
(defalias 'erc-cmd-J 'erc-cmd-JOIN)
-(defvar erc-channel-new-member-names nil
+(defvar-local erc-channel-new-member-names nil
"If non-nil, a names list is currently being received.
If non-nil, this variable is a hash-table that associates
received nicks with t.")
-(make-variable-buffer-local 'erc-channel-new-member-names)
(defun erc-cmd-NAMES (&optional channel)
"Display the users in CHANNEL.
@@ -3833,7 +3810,7 @@ If CHANNEL is not specified, clear the topic for the default channel."
;;; Banlists
-(defvar erc-channel-banlist nil
+(defvar-local erc-channel-banlist nil
"A list of bans seen for the current channel.
Each ban is an alist of the form:
@@ -3841,7 +3818,6 @@ Each ban is an alist of the form:
The property `received-from-server' indicates whether
or not the ban list has been requested from the server.")
-(make-variable-buffer-local 'erc-channel-banlist)
(put 'erc-channel-banlist 'received-from-server nil)
(defun erc-cmd-BANLIST ()
@@ -6783,8 +6759,7 @@ functions."
"")))))
-(defvar erc-current-message-catalog 'english)
-(make-variable-buffer-local 'erc-current-message-catalog)
+(defvar-local erc-current-message-catalog 'english)
(defun erc-retrieve-catalog-entry (entry &optional catalog)
"Retrieve ENTRY from CATALOG.
diff --git a/lisp/files.el b/lisp/files.el
index 77e3a3a834c..dada69c1457 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -191,20 +191,18 @@ if the file has changed on disk and you have not edited the buffer."
:type '(repeat regexp)
:group 'find-file)
-(defvar buffer-file-number nil
+(defvar-local buffer-file-number nil
"The device number and file number of the file visited in the current buffer.
The value is a list of the form (FILENUM DEVNUM).
This pair of numbers uniquely identifies the file.
If the buffer is visiting a new file, the value is nil.")
-(make-variable-buffer-local 'buffer-file-number)
(put 'buffer-file-number 'permanent-local t)
(defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt)))
"Non-nil means that `buffer-file-number' uniquely identifies files.")
-(defvar buffer-file-read-only nil
+(defvar-local buffer-file-read-only nil
"Non-nil if visited file was read-only when visited.")
-(make-variable-buffer-local 'buffer-file-read-only)
(defcustom small-temporary-file-directory
(if (eq system-type 'ms-dos) (getenv "TMPDIR"))
@@ -529,15 +527,14 @@ updates before the buffer is saved, use `before-save-hook'.")
(put 'write-file-functions 'permanent-local t)
;; I found some files still using the obsolete form in 2018.
-(defvar local-write-file-hooks nil)
-(make-variable-buffer-local 'local-write-file-hooks)
+(defvar-local local-write-file-hooks nil)
(put 'local-write-file-hooks 'permanent-local t)
(make-obsolete-variable 'local-write-file-hooks 'write-file-functions "22.1")
;; I found some files still using the obsolete form in 2018.
(define-obsolete-variable-alias 'write-contents-hooks
'write-contents-functions "22.1")
-(defvar write-contents-functions nil
+(defvar-local write-contents-functions nil
"List of functions to be called before writing out a buffer to a file.
Used only by `save-buffer'. If one of them returns non-nil, the
@@ -556,7 +553,6 @@ For hooks that _do_ pertain to the particular visited file, use
`write-file-functions' relate to how a buffer is saved to file.
To perform various checks or updates before the buffer is saved,
use `before-save-hook'.")
-(make-variable-buffer-local 'write-contents-functions)
(defcustom enable-local-variables t
"Control use of local variables in files you visit.
@@ -3443,23 +3439,21 @@ asking you for confirmation."
(put 'c-set-style 'safe-local-eval-function t)
-(defvar file-local-variables-alist nil
+(defvar-local file-local-variables-alist nil
"Alist of file-local variable settings in the current buffer.
Each element in this list has the form (VAR . VALUE), where VAR
is a file-local variable (a symbol) and VALUE is the value
specified. The actual value in the buffer may differ from VALUE,
if it is changed by the major or minor modes, or by the user.")
-(make-variable-buffer-local 'file-local-variables-alist)
(put 'file-local-variables-alist 'permanent-local t)
-(defvar dir-local-variables-alist nil
+(defvar-local dir-local-variables-alist nil
"Alist of directory-local variable settings in the current buffer.
Each element in this list has the form (VAR . VALUE), where VAR
is a directory-local variable (a symbol) and VALUE is the value
specified in .dir-locals.el. The actual value in the buffer
may differ from VALUE, if it is changed by the major or minor modes,
or by the user.")
-(make-variable-buffer-local 'dir-local-variables-alist)
(defvar before-hack-local-variables-hook nil
"Normal hook run before setting file-local variables.
@@ -5233,7 +5227,7 @@ Used only by `save-buffer'."
:type 'hook
:group 'files)
-(defvar save-buffer-coding-system nil
+(defvar-local save-buffer-coding-system nil
"If non-nil, use this coding system for saving the buffer.
More precisely, use this coding system in place of the
value of `buffer-file-coding-system', when saving the buffer.
@@ -5241,7 +5235,6 @@ Calling `write-region' for any purpose other than saving the buffer
will still use `buffer-file-coding-system'; this variable has no effect
in such cases.")
-(make-variable-buffer-local 'save-buffer-coding-system)
(put 'save-buffer-coding-system 'permanent-local t)
(defun basic-save-buffer (&optional called-interactively)
@@ -5510,9 +5503,8 @@ Before and after saving the buffer, this function runs
"ACTION-ALIST argument used in call to `map-y-or-n-p'.")
(put 'save-some-buffers-action-alist 'risky-local-variable t)
-(defvar buffer-save-without-query nil
+(defvar-local buffer-save-without-query nil
"Non-nil means `save-some-buffers' should save this buffer without asking.")
-(make-variable-buffer-local 'buffer-save-without-query)
(defcustom save-some-buffers-default-predicate nil
"Default predicate for `save-some-buffers'.
diff --git a/lisp/font-core.el b/lisp/font-core.el
index 0f1a3d1c364..4b695424977 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -26,7 +26,7 @@
;; This variable is used by mode packages that support Font Lock mode by
;; defining their own keywords to use for `font-lock-keywords'. (The mode
;; command should make it buffer-local and set it to provide the set up.)
-(defvar font-lock-defaults nil
+(defvar-local font-lock-defaults nil
"Defaults for Font Lock mode specified by the major mode.
Defaults should be of the form:
@@ -66,7 +66,6 @@ functions, `font-lock-fontify-buffer-function',
`font-lock-unfontify-region-function', and `font-lock-inhibit-thing-lock'.")
;;;###autoload
(put 'font-lock-defaults 'risky-local-variable t)
-(make-variable-buffer-local 'font-lock-defaults)
(defvar font-lock-function 'font-lock-default-function
"A function which is called when `font-lock-mode' is toggled.
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index a9fc69d419a..c344a612581 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -515,17 +515,15 @@ This is normally set via `font-lock-add-keywords' and
"Non-nil means Font Lock should not fontify comments or strings.
This is normally set via `font-lock-defaults'.")
-(defvar font-lock-keywords-case-fold-search nil
+(defvar-local font-lock-keywords-case-fold-search nil
"Non-nil means the patterns in `font-lock-keywords' are case-insensitive.
This is set via the function `font-lock-set-defaults', based on
the CASE-FOLD argument of `font-lock-defaults'.")
-(make-variable-buffer-local 'font-lock-keywords-case-fold-search)
-(defvar font-lock-syntactically-fontified 0
+(defvar-local font-lock-syntactically-fontified 0
"Point up to which `font-lock-syntactic-keywords' has been applied.
If nil, this is ignored, in which case the syntactic fontification may
sometimes be slightly incorrect.")
-(make-variable-buffer-local 'font-lock-syntactically-fontified)
(defvar font-lock-syntactic-face-function
(lambda (state)
@@ -1026,7 +1024,7 @@ The value of this variable is used when Font Lock mode is turned on."
;; directives correctly and cleanly. (It is the same problem as fontifying
;; multi-line strings and comments; regexps are not appropriate for the job.)
-(defvar font-lock-extend-after-change-region-function nil
+(defvar-local font-lock-extend-after-change-region-function nil
"A function that determines the region to refontify after a change.
This variable is either nil, or is a function that determines the
@@ -1040,7 +1038,6 @@ and end buffer positions \(in that order) of the region to refontify, or nil
\(which directs the caller to fontify a default region).
This function should preserve the match-data.
The region it returns may start or end in the middle of a line.")
-(make-variable-buffer-local 'font-lock-extend-after-change-region-function)
(defun font-lock-fontify-buffer (&optional interactively)
"Fontify the current buffer the way the function `font-lock-mode' would."
@@ -1159,7 +1156,7 @@ a very meaningful entity to highlight.")
(defvar font-lock-beg) (defvar font-lock-end)
-(defvar font-lock-extend-region-functions
+(defvar-local font-lock-extend-region-functions
'(font-lock-extend-region-wholelines
;; This use of font-lock-multiline property is unreliable but is just
;; a handy heuristic: in case you don't have a function that does
@@ -1181,7 +1178,6 @@ These functions are run in turn repeatedly until they all return nil.
Put first the functions more likely to cause a change and cheaper to compute.")
;; Mark it as a special hook which doesn't use any global setting
;; (i.e. doesn't obey the element t in the buffer-local value).
-(make-variable-buffer-local 'font-lock-extend-region-functions)
(defun font-lock-extend-region-multiline ()
"Move fontification boundaries away from any `font-lock-multiline' property."
@@ -1888,9 +1884,8 @@ preserve `hi-lock-mode' highlighting patterns."
(kill-local-variable 'font-lock-set-defaults)
(font-lock-mode 1))
-(defvar font-lock-major-mode nil
+(defvar-local font-lock-major-mode nil
"Major mode for which the font-lock settings have been setup.")
-(make-variable-buffer-local 'font-lock-major-mode)
(defun font-lock-set-defaults ()
"Set fontification defaults appropriately for this mode.
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 8202c3ee27a..5dc3de4422b 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1315,15 +1315,13 @@ Each function is called with one arg, LEIM directory name.")
(dolist (function update-leim-list-functions)
(apply function dirs)))
-(defvar current-input-method nil
+(defvar-local current-input-method nil
"The current input method for multilingual text.
If nil, that means no input method is activated now.")
-(make-variable-buffer-local 'current-input-method)
(put 'current-input-method 'permanent-local t)
-(defvar current-input-method-title nil
+(defvar-local current-input-method-title nil
"Title string of the current input method shown in mode line.")
-(make-variable-buffer-local 'current-input-method-title)
(put 'current-input-method-title 'permanent-local t)
(define-widget 'mule-input-method-string 'string
@@ -1355,45 +1353,40 @@ This is the input method activated by the command
:set-after '(current-language-environment)
:version "28.1")
-(defvar current-transient-input-method nil
+(defvar-local current-transient-input-method nil
"Current input method temporarily enabled by `activate-transient-input-method'.
If nil, that means no transient input method is active now.")
-(make-variable-buffer-local 'current-transient-input-method)
(put 'current-transient-input-method 'permanent-local t)
-(defvar previous-transient-input-method nil
+(defvar-local previous-transient-input-method nil
"The input method that was active before enabling the transient input method.
If nil, that means no previous input method was active.")
-(make-variable-buffer-local 'previous-transient-input-method)
(put 'previous-transient-input-method 'permanent-local t)
(put 'input-method-function 'permanent-local t)
-(defvar input-method-history nil
+(defvar-local input-method-history nil
"History list of input methods read from the minibuffer.
Maximum length of the history list is determined by the value
of `history-length', which see.")
-(make-variable-buffer-local 'input-method-history)
(put 'input-method-history 'permanent-local t)
(define-obsolete-variable-alias
'inactivate-current-input-method-function
'deactivate-current-input-method-function "24.3")
-(defvar deactivate-current-input-method-function nil
+(defvar-local deactivate-current-input-method-function nil
"Function to call for deactivating the current input method.
Every input method should set this to an appropriate value when activated.
This function is called with no argument.
This function should never change the value of `current-input-method'.
It is set to nil by the function `deactivate-input-method'.")
-(make-variable-buffer-local 'deactivate-current-input-method-function)
(put 'deactivate-current-input-method-function 'permanent-local t)
-(defvar describe-current-input-method-function nil
+(defvar-local describe-current-input-method-function nil
"Function to call for describing the current input method.
This function is called with no argument.")
-(make-variable-buffer-local 'describe-current-input-method-function)
(put 'describe-current-input-method-function 'permanent-local t)
(defvar input-method-alist nil
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 6a32cffe9a6..52e743e6f3d 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1191,12 +1191,11 @@ FORM is a form to evaluate to define the coding-system."
;; `last-coding-system-used'. (It used to set it unconditionally, but
;; that seems unnecessary; see Bug#4533.)
-(defvar buffer-file-coding-system-explicit nil
+(defvar-local buffer-file-coding-system-explicit nil
"The file coding system explicitly specified for the current buffer.
The value is a cons of coding systems for reading (decoding) and
writing (encoding).
Internal use only.")
-(make-variable-buffer-local 'buffer-file-coding-system-explicit)
(put 'buffer-file-coding-system-explicit 'permanent-local t)
(defun read-buffer-file-coding-system ()
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 0901115cffe..67ea00665fc 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -61,15 +61,14 @@
;; Buffer local variables
-(defvar quail-current-package nil
+(defvar-local quail-current-package nil
"The current Quail package, which depends on the current input method.
See the documentation of `quail-package-alist' for the format.")
-(make-variable-buffer-local 'quail-current-package)
(put 'quail-current-package 'permanent-local t)
;; Quail uses the following variables to assist users.
;; A string containing available key sequences or translation list.
-(defvar quail-guidance-str nil)
+(defvar-local quail-guidance-str nil)
;; A buffer to show completion list of the current key sequence.
(defvar quail-completion-buf nil)
;; We may display the guidance string in a buffer on a one-line frame.
@@ -78,41 +77,34 @@ See the documentation of `quail-package-alist' for the format.")
;; Each buffer in which Quail is activated should use different
;; guidance string.
-(make-variable-buffer-local 'quail-guidance-str)
(put 'quail-guidance-str 'permanent-local t)
-(defvar quail-overlay nil
+(defvar-local quail-overlay nil
"Overlay which covers the current translation region of Quail.")
-(make-variable-buffer-local 'quail-overlay)
-(defvar quail-conv-overlay nil
+(defvar-local quail-conv-overlay nil
"Overlay which covers the text to be converted in Quail mode.")
-(make-variable-buffer-local 'quail-conv-overlay)
-(defvar quail-current-key nil
+(defvar-local quail-current-key nil
"Current key for translation in Quail mode.")
-(make-variable-buffer-local 'quail-current-key)
-(defvar quail-current-str nil
+(defvar-local quail-current-str nil
"Currently selected translation of the current key.")
-(make-variable-buffer-local 'quail-current-str)
-(defvar quail-current-translations nil
+(defvar-local quail-current-translations nil
"Cons of indices and vector of possible translations of the current key.
Indices is a list of (CURRENT START END BLOCK BLOCKS), where
CURRENT is an index of the current translation,
START and END are indices of the start and end of the current block,
BLOCK is the current block index,
BLOCKS is a number of blocks of translation.")
-(make-variable-buffer-local 'quail-current-translations)
-(defvar quail-current-data nil
+(defvar-local quail-current-data nil
"Any Lisp object holding information of current translation status.
When a key sequence is mapped to TRANS and TRANS is a cons
of actual translation and some Lisp object to be referred
for translating the longer key sequence, this variable is set
to that Lisp object.")
-(make-variable-buffer-local 'quail-current-data)
;; Quail package handlers.
@@ -2027,10 +2019,15 @@ minibuffer and the selected frame has no other windows)."
(bury-buffer quail-completion-buf)
;; Then, show the guidance.
- (when (and (quail-require-guidance-buf)
- (not input-method-use-echo-area)
- (null unread-command-events)
- (null unread-post-input-method-events))
+ (when (and
+ ;; Don't try to display guidance on an expired minibuffer. This
+ ;; would go into an infinite wait rather than executing the user's
+ ;; command. Bug #45792.
+ (not (eq major-mode 'minibuffer-inactive-mode))
+ (quail-require-guidance-buf)
+ (not input-method-use-echo-area)
+ (null unread-command-events)
+ (null unread-post-input-method-events))
(if (minibufferp)
(if (eq (minibuffer-window) (frame-root-window))
;; Use another frame. It is sure that we are using some
diff --git a/lisp/international/robin.el b/lisp/international/robin.el
index 55390df315f..e4a11801c38 100644
--- a/lisp/international/robin.el
+++ b/lisp/international/robin.el
@@ -371,14 +371,12 @@ Internal use only."
;;; Interactive use
-(defvar robin-mode nil
+(defvar-local robin-mode nil
"If non-nil, `robin-input-method' is active.")
-(make-variable-buffer-local 'robin-mode)
-(defvar robin-current-package-name nil
+(defvar-local robin-current-package-name nil
"String representing the name of the current robin package.
A nil value means no package is selected.")
-(make-variable-buffer-local 'robin-current-package-name)
;;;###autoload
(defun robin-use-package (name)
diff --git a/lisp/isearch.el b/lisp/isearch.el
index a1e3fe2c3f0..82d64c5766b 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -352,10 +352,20 @@ If this is nil, extra highlighting can be \"manually\" removed with
:group 'lazy-highlight)
(defcustom lazy-highlight-initial-delay 0.25
- "Seconds to wait before beginning to lazily highlight all matches."
+ "Seconds to wait before beginning to lazily highlight all matches.
+This setting only has effect when the search string is less than
+`lazy-highlight-no-delay-length' characters long."
:type 'number
:group 'lazy-highlight)
+(defcustom lazy-highlight-no-delay-length 3
+ "For search strings at least this long, lazy highlight starts immediately.
+For shorter search strings, `lazy-highlight-initial-delay'
+applies."
+ :type 'integer
+ :group 'lazy-highlight
+ :version "28.1")
+
(defcustom lazy-highlight-interval 0 ; 0.0625
"Seconds between lazily highlighting successive matches."
:type 'number
@@ -3356,7 +3366,7 @@ isearch-message-suffix prompt. Otherwise, for isearch-message-prefix."
(not isearch-error)
(not isearch-suspended))
(format format-string
- (if isearch-forward
+ (if isearch-lazy-highlight-forward
isearch-lazy-count-current
(if (eq isearch-lazy-count-current 0)
0
@@ -3916,7 +3926,8 @@ by other Emacs features."
(clrhash isearch-lazy-count-hash)
(setq isearch-lazy-count-current nil
isearch-lazy-count-total nil)
- (isearch-message)))
+ ;; Delay updating the message if possible, to avoid flicker
+ (when (string-equal isearch-string "") (isearch-message))))
(setq isearch-lazy-highlight-window-start-changed nil)
(setq isearch-lazy-highlight-window-end-changed nil)
(setq isearch-lazy-highlight-error isearch-error)
@@ -3961,7 +3972,11 @@ by other Emacs features."
(point-min))))
(unless (equal isearch-string "")
(setq isearch-lazy-highlight-timer
- (run-with-idle-timer lazy-highlight-initial-delay nil
+ (run-with-idle-timer (if (>= (length isearch-string)
+ lazy-highlight-no-delay-length)
+ 0
+ lazy-highlight-initial-delay)
+ nil
'isearch-lazy-highlight-start))))
;; Update the current match number only in isearch-mode and
;; unless isearch-mode is used specially with isearch-message-function
diff --git a/lisp/language/korea-util.el b/lisp/language/korea-util.el
index c99ff3c3f2d..b999eff662f 100644
--- a/lisp/language/korea-util.el
+++ b/lisp/language/korea-util.el
@@ -32,13 +32,15 @@
(purecopy (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") ""))
"3"
""))
- "The kind of Korean keyboard for Korean input method.
-\"\" for 2, \"3\" for 3.")
+ "The kind of Korean keyboard for Korean (Hangul) input method.
+\"\" for 2, \"3\" for 3, and \"3f\" for 3f.")
;; functions useful for Korean text input
(defun toggle-korean-input-method ()
- "Turn on or off a Korean text input method for the current buffer."
+ "Turn on or off a Korean text input method for the current buffer.
+The keyboard layout variation used is determined by
+`default-korean-keyboard'."
(interactive)
(if current-input-method
(deactivate-input-method)
@@ -46,7 +48,9 @@
(concat "korean-hangul" default-korean-keyboard))))
(defun quail-hangul-switch-symbol-ksc (&rest _ignore)
- "Switch to/from Korean symbol package."
+ "Switch to/from Korean symbol package.
+The keyboard layout variation used is determined by
+`default-korean-keyboard'."
(interactive "i")
(and current-input-method
(if (string-equal current-input-method "korean-symbol")
@@ -55,7 +59,9 @@
(activate-input-method "korean-symbol"))))
(defun quail-hangul-switch-hanja (&rest _ignore)
- "Switch to/from Korean hanja package."
+ "Switch to/from Korean hanja package.
+The keyboard layout variation used is determined by
+`default-korean-keyboard'."
(interactive "i")
(and current-input-method
(if (string-match "korean-hanja" current-input-method)
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 4e8009db864..815ff4339eb 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -58,13 +58,11 @@
(defvar report-emacs-bug-orig-text nil
"The automatically-created initial text of the bug report.")
-(defvar report-emacs-bug-send-command nil
+(defvar-local report-emacs-bug-send-command nil
"Name of the command to send the bug report, as a string.")
-(make-variable-buffer-local 'report-emacs-bug-send-command)
-(defvar report-emacs-bug-send-hook nil
+(defvar-local report-emacs-bug-send-hook nil
"Hook run before sending the bug report.")
-(make-variable-buffer-local 'report-emacs-bug-send-hook)
(declare-function x-server-vendor "xfns.c" (&optional terminal))
(declare-function x-server-version "xfns.c" (&optional terminal))
diff --git a/lisp/mail/reporter.el b/lisp/mail/reporter.el
index 2e583a470d6..4b70582a261 100644
--- a/lisp/mail/reporter.el
+++ b/lisp/mail/reporter.el
@@ -100,9 +100,8 @@ This is necessary to properly support the printing of buffer-local
variables. Current buffer will always be the mail buffer being
composed.")
-(defvar reporter-initial-text nil
+(defvar-local reporter-initial-text nil
"The automatically created initial text of a bug report.")
-(make-variable-buffer-local 'reporter-initial-text)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 9f95b62d870..8ccf1bffdd6 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -620,14 +620,12 @@ Element N specifies the summary line for message N+1.")
;; Rmail buffer swapping variables.
-(defvar rmail-buffer-swapped nil
+(defvar-local rmail-buffer-swapped nil
"If non-nil, `rmail-buffer' is swapped with `rmail-view-buffer'.")
-(make-variable-buffer-local 'rmail-buffer-swapped)
(put 'rmail-buffer-swapped 'permanent-local t)
-(defvar rmail-view-buffer nil
+(defvar-local rmail-view-buffer nil
"Buffer which holds RMAIL message for MIME displaying.")
-(make-variable-buffer-local 'rmail-view-buffer)
(put 'rmail-view-buffer 'permanent-local t)
;; `Sticky' default variables.
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el
index 5766c791878..99ac41dd9ba 100644
--- a/lisp/mail/supercite.el
+++ b/lisp/mail/supercite.el
@@ -509,9 +509,9 @@ string."
;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
;; end user configuration variables
-(defvar sc-mail-info nil
+(defvar-local sc-mail-info nil
"Alist of mail header information gleaned from reply buffer.")
-(defvar sc-attributions nil
+(defvar-local sc-attributions nil
"Alist of attributions for use when citing.")
(defvar sc-tmp-nested-regexp nil
@@ -521,9 +521,6 @@ string."
(defvar sc-tmp-dumb-regexp nil
"Temp regexp describing non-nested citation cited with a nesting citer.")
-(make-variable-buffer-local 'sc-mail-info)
-(make-variable-buffer-local 'sc-attributions)
-
;; ======================================================================
;; supercite keymaps
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 526491f0272..2fdfcc8b582 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2240,9 +2240,8 @@ Buffers menu is regenerated."
:type 'boolean
:group 'menu)
-(defvar list-buffers-directory nil
+(defvar-local list-buffers-directory nil
"String to display in buffer listings for buffers not visiting a file.")
-(make-variable-buffer-local 'list-buffers-directory)
(defun menu-bar-select-buffer ()
(interactive)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 315f2d369af..03cc70c0d4d 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -122,7 +122,8 @@ This metadata is an alist. Currently understood keys are:
returns a string to append to STRING.
- `affixation-function': function to prepend/append a prefix/suffix to
entries. Takes one argument (COMPLETIONS) and should return a list
- of completions with a list of three elements: completion, its prefix
+ of completions with a list of either two elements: completion
+ and suffix, or three elements: completion, its prefix
and suffix. This function takes priority over `annotation-function'
when both are provided, so only this function is used.
- `display-sort-function': function to sort entries in *Completions*.
@@ -1785,22 +1786,17 @@ It also eliminates runs of equal strings."
(when prefix
(let ((beg (point))
(end (progn (insert prefix) (point))))
- (put-text-property beg end 'mouse-face nil)
- ;; When both prefix and suffix are added
- ;; by the caller via affixation-function,
- ;; then allow the caller to decide
- ;; what faces to put on prefix and suffix.
- (unless prefix
- (font-lock-prepend-text-property
- beg end 'face 'completions-annotations))))
+ (put-text-property beg end 'mouse-face nil)))
(put-text-property (point) (progn (insert (car str)) (point))
'mouse-face 'highlight)
(let ((beg (point))
(end (progn (insert suffix) (point))))
(put-text-property beg end 'mouse-face nil)
;; Put the predefined face only when suffix
- ;; is added via annotation-function.
- (unless prefix
+ ;; is added via annotation-function without prefix,
+ ;; and when the caller doesn't use own face.
+ (unless (or prefix (text-property-not-all
+ 0 (length suffix) 'face nil suffix))
(font-lock-prepend-text-property
beg end 'face 'completions-annotations)))))
(cond
@@ -1927,6 +1923,7 @@ These include:
`:affixation-function': Function to prepend/append a prefix/suffix to
completions. The function must accept one argument, a list of
completions, and return a list where each element is a list of
+ either two elements: a completion, and a suffix, or
three elements: a completion, a prefix and a suffix.
This function takes priority over `:annotation-function'
when both are provided, so only this function is used.
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 7b72a713623..58f01d5bf98 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -481,8 +481,7 @@ Used by the `browse-url-of-file' command."
"Hook run after `browse-url-of-file' has asked a browser to load a file."
:type 'hook)
-(defvar browse-url-temp-file-name nil)
-(make-variable-buffer-local 'browse-url-temp-file-name)
+(defvar-local browse-url-temp-file-name nil)
(defcustom browse-url-xterm-program "xterm"
"The name of the terminal emulator used by `browse-url-text-xterm'.
diff --git a/lisp/net/newst-backend.el b/lisp/net/newst-backend.el
index 3b120be61f5..ea96012af20 100644
--- a/lisp/net/newst-backend.el
+++ b/lisp/net/newst-backend.el
@@ -34,7 +34,6 @@
;; ======================================================================
;;; Code:
-(require 'derived)
(require 'xml)
(require 'url-parse)
(require 'iso8601)
diff --git a/lisp/net/newst-plainview.el b/lisp/net/newst-plainview.el
index 44d2fd666ad..21d47b838f5 100644
--- a/lisp/net/newst-plainview.el
+++ b/lisp/net/newst-plainview.el
@@ -34,7 +34,6 @@
(require 'newst-ticker)
(require 'newst-reader)
-(require 'derived)
(require 'xml)
;; Silence warnings
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 22348a1725c..58cc8b1be55 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -178,13 +178,11 @@ If nil, no maximum is applied."
:type '(choice (const :tag "No maximum" nil)
(integer :tag "Number of characters")))
-(defvar rcirc-ignore-buffer-activity-flag nil
+(defvar-local rcirc-ignore-buffer-activity-flag nil
"If non-nil, ignore activity in this buffer.")
-(make-variable-buffer-local 'rcirc-ignore-buffer-activity-flag)
-(defvar rcirc-low-priority-flag nil
+(defvar-local rcirc-low-priority-flag nil
"If non-nil, activity in this buffer is considered low priority.")
-(make-variable-buffer-local 'rcirc-low-priority-flag)
(defcustom rcirc-omit-responses
'("JOIN" "PART" "QUIT" "NICK")
@@ -1328,8 +1326,7 @@ Create the buffer if it doesn't exist."
(rcirc-send-string process
(concat command " :" args)))))))
-(defvar rcirc-parent-buffer nil)
-(make-variable-buffer-local 'rcirc-parent-buffer)
+(defvar-local rcirc-parent-buffer nil)
(put 'rcirc-parent-buffer 'permanent-local t)
(defvar rcirc-window-configuration nil)
(defun rcirc-edit-multiline ()
@@ -1501,10 +1498,8 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
((or (rcirc-get-buffer process target)
(rcirc-any-buffer process))))))
-(defvar rcirc-activity-types nil)
-(make-variable-buffer-local 'rcirc-activity-types)
-(defvar rcirc-last-sender nil)
-(make-variable-buffer-local 'rcirc-last-sender)
+(defvar-local rcirc-activity-types nil)
+(defvar-local rcirc-last-sender nil)
(defcustom rcirc-omit-threshold 100
"Lines since last activity from a nick before `rcirc-omit-responses' are omitted."
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index 604e35c07cf..9d4e440719d 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -206,17 +206,13 @@ This is a specialization of `soap-sample-value' for
;;; soap-inspect
-(defvar soap-inspect-previous-items nil
+(defvar-local soap-inspect-previous-items nil
"A stack of previously inspected items in the *soap-inspect* buffer.
Used to implement the BACK button.")
-(defvar soap-inspect-current-item nil
+(defvar-local soap-inspect-current-item nil
"The current item being inspected in the *soap-inspect* buffer.")
-(progn
- (make-variable-buffer-local 'soap-inspect-previous-items)
- (make-variable-buffer-local 'soap-inspect-current-item))
-
(defun soap-inspect (element)
"Inspect a SOAP ELEMENT in the *soap-inspect* buffer.
The buffer is populated with information about ELEMENT with links
diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el
index 67f844428a7..44f535f01c9 100644
--- a/lisp/net/telnet.el
+++ b/lisp/net/telnet.el
@@ -72,15 +72,12 @@ LOGIN-NAME, which is optional, says what to log in as on that machine.")
(defvar telnet-prompt-pattern "^[^#$%>\n]*[#$%>] *")
(defvar telnet-replace-c-g nil)
-(make-variable-buffer-local
- (defvar telnet-remote-echoes t
- "True if the telnet process will echo input."))
-(make-variable-buffer-local
- (defvar telnet-interrupt-string "\C-c" "String sent by C-c."))
+(defvar-local telnet-remote-echoes t
+ "True if the telnet process will echo input.")
+(defvar-local telnet-interrupt-string "\C-c" "String sent by C-c.")
-(defvar telnet-count 0
+(defvar-local telnet-count 0
"Number of output strings from telnet process while looking for password.")
-(make-variable-buffer-local 'telnet-count)
(defvar telnet-program "telnet"
"Program to run to open a telnet connection.")
diff --git a/lisp/nxml/rng-cmpct.el b/lisp/nxml/rng-cmpct.el
index dcbd7ed1dd7..45a69a73f35 100644
--- a/lisp/nxml/rng-cmpct.el
+++ b/lisp/nxml/rng-cmpct.el
@@ -123,8 +123,7 @@ Return a pattern."
(set-buffer-multibyte t)
(set-syntax-table rng-c-syntax-table))
-(defvar rng-c-current-token nil)
-(make-variable-buffer-local 'rng-c-current-token)
+(defvar-local rng-c-current-token nil)
(defun rng-c-advance ()
(cond ((looking-at rng-c-token-re)
@@ -334,11 +333,9 @@ OVERRIDE is either nil, require or t."
;;; Parsing
-(defvar rng-c-escape-positions nil)
-(make-variable-buffer-local 'rng-c-escape-positions)
+(defvar-local rng-c-escape-positions nil)
-(defvar rng-c-file-name nil)
-(make-variable-buffer-local 'rng-c-file-name)
+(defvar-local rng-c-file-name nil)
(defvar rng-c-file-index nil)
diff --git a/lisp/nxml/rng-pttrn.el b/lisp/nxml/rng-pttrn.el
index 12ffa578200..034671feeb0 100644
--- a/lisp/nxml/rng-pttrn.el
+++ b/lisp/nxml/rng-pttrn.el
@@ -66,9 +66,8 @@
(defvar rng-schema-change-hook nil
"Hook to be run after `rng-current-schema' changes.")
-(defvar rng-current-schema nil
+(defvar-local rng-current-schema nil
"Pattern to be used as schema for the current buffer.")
-(make-variable-buffer-local 'rng-current-schema)
(defun rng-make-ref (name)
(list 'ref nil name))
diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el
index 6ea893404cb..a5eb893c554 100644
--- a/lisp/nxml/rng-valid.el
+++ b/lisp/nxml/rng-valid.el
@@ -132,36 +132,30 @@ A quick validation validates at most one chunk."
;; Global variables
-(defvar rng-validate-timer nil)
-(make-variable-buffer-local 'rng-validate-timer)
+(defvar-local rng-validate-timer nil)
;; ensure that we can cancel the timer even after a kill-all-local-variables
(put 'rng-validate-timer 'permanent-local t)
-(defvar rng-validate-quick-timer nil)
-(make-variable-buffer-local 'rng-validate-quick-timer)
+(defvar-local rng-validate-quick-timer nil)
;; ensure that we can cancel the timer even after a kill-all-local-variables
(put 'rng-validate-quick-timer 'permanent-local t)
-(defvar rng-error-count nil
+(defvar-local rng-error-count nil
"Number of errors in the current buffer.
Always equal to number of overlays with category `rng-error'.")
-(make-variable-buffer-local 'rng-error-count)
-(defvar rng-message-overlay nil
+(defvar-local rng-message-overlay nil
"Overlay in this buffer whose `help-echo' property was last printed.
It is nil if none.")
-(make-variable-buffer-local 'rng-message-overlay)
-(defvar rng-message-overlay-inhibit-point nil
+(defvar-local rng-message-overlay-inhibit-point nil
"Position at which message from overlay should be inhibited.
If point is equal to this and the error overlay around
point is `rng-message-overlay', then the `help-echo' property
of the error overlay should not be printed with `message'.")
-(make-variable-buffer-local 'rng-message-overlay-inhibit-point)
-(defvar rng-message-overlay-current nil
+(defvar-local rng-message-overlay-current nil
"Non-nil if `rng-message-overlay' is still the current message.")
-(make-variable-buffer-local 'rng-message-overlay-current)
(defvar rng-open-elements nil
"Stack of names of open elements represented as a list.
@@ -178,11 +172,10 @@ indicating an unresolvable entity or character reference.")
(defvar rng-collecting-text nil)
-(defvar rng-validate-up-to-date-end nil
+(defvar-local rng-validate-up-to-date-end nil
"Last position where validation is known to be up to date.")
-(make-variable-buffer-local 'rng-validate-up-to-date-end)
-(defvar rng-conditional-up-to-date-start nil
+(defvar-local rng-conditional-up-to-date-start nil
"Marker for the start of the conditionally up-to-date region.
It is nil if there is no conditionally up-to-date region. The
conditionally up-to-date region must be such that for any cached
@@ -191,20 +184,17 @@ if at some point it is determined that S becomes correct for P,
then all states with position >= P in the conditionally up to
date region must also then be correct and all errors between P
and the end of the region must then be correctly marked.")
-(make-variable-buffer-local 'rng-conditional-up-to-date-start)
-(defvar rng-conditional-up-to-date-end nil
+(defvar-local rng-conditional-up-to-date-end nil
"Marker for the end of the conditionally up-to-date region.
It is nil if there is no conditionally up-to-date region.
See the variable `rng-conditional-up-to-date-start'.")
-(make-variable-buffer-local 'rng-conditional-up-to-date-end)
(defvar rng-parsing-for-state nil
"Non-nil means we are currently parsing just to compute the state.
Should be dynamically bound.")
-(defvar rng-dtd nil)
-(make-variable-buffer-local 'rng-dtd)
+(defvar-local rng-dtd nil)
;;;###autoload
(define-minor-mode rng-validate-mode
diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el
index 07ef30c07d1..05e61dfe401 100644
--- a/lisp/play/5x5.el
+++ b/lisp/play/5x5.el
@@ -84,23 +84,24 @@
(defmacro 5x5-defvar-local (var value doc)
"Define VAR to VALUE with documentation DOC and make it buffer local."
+ (declare (obsolete defvar-local "28.1"))
`(progn
(defvar ,var ,value ,doc)
(make-variable-buffer-local (quote ,var))))
-(5x5-defvar-local 5x5-grid nil
+(defvar-local 5x5-grid nil
"5x5 grid contents.")
-(5x5-defvar-local 5x5-x-pos 2
+(defvar-local 5x5-x-pos 2
"X position of cursor.")
-(5x5-defvar-local 5x5-y-pos 2
+(defvar-local 5x5-y-pos 2
"Y position of cursor.")
-(5x5-defvar-local 5x5-moves 0
+(defvar-local 5x5-moves 0
"Moves made.")
-(5x5-defvar-local 5x5-cracking nil
+(defvar-local 5x5-cracking nil
"Are we in cracking mode?")
(defvar 5x5-buffer-name "*5x5*"
@@ -140,7 +141,7 @@
map)
"Local keymap for the 5x5 game.")
-(5x5-defvar-local 5x5-solver-output nil
+(defvar-local 5x5-solver-output nil
"List that is the output of an arithmetic solver.
This list L is such that
diff --git a/lisp/play/decipher.el b/lisp/play/decipher.el
index a7a4b89c372..b870bfb4a19 100644
--- a/lisp/play/decipher.el
+++ b/lisp/play/decipher.el
@@ -184,28 +184,24 @@ the tail of the list."
(cl-incf c))
(setq decipher-mode-syntax-table table)))
-(defvar decipher-alphabet nil)
+(defvar-local decipher-alphabet nil)
;; This is an alist containing entries (PLAIN-CHAR . CIPHER-CHAR),
;; where PLAIN-CHAR runs from ?a to ?z and CIPHER-CHAR is an uppercase
;; letter or space (which means no mapping is known for that letter).
;; This *must* contain entries for all lowercase characters.
-(make-variable-buffer-local 'decipher-alphabet)
-(defvar decipher-stats-buffer nil
+(defvar-local decipher-stats-buffer nil
"The buffer which displays statistics for this ciphertext.
Do not access this variable directly, use the function
`decipher-stats-buffer' instead.")
-(make-variable-buffer-local 'decipher-stats-buffer)
-(defvar decipher-undo-list-size 0
+(defvar-local decipher-undo-list-size 0
"The number of entries in the undo list.")
-(make-variable-buffer-local 'decipher-undo-list-size)
-(defvar decipher-undo-list nil
+(defvar-local decipher-undo-list nil
"The undo list for this buffer.
Each element is either a cons cell (PLAIN-CHAR . CIPHER-CHAR) or a
list of such cons cells.")
-(make-variable-buffer-local 'decipher-undo-list)
(defvar decipher-pending-undo-list nil)
diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el
index e540ca723d0..8b64dfdf9b5 100644
--- a/lisp/play/gamegrid.el
+++ b/lisp/play/gamegrid.el
@@ -28,36 +28,35 @@
;; ;;;;;;;;;;;;; buffer-local variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar gamegrid-use-glyphs t
+(defvar-local gamegrid-use-glyphs t
"Non-nil means use glyphs when available.")
-(defvar gamegrid-use-color t
+(defvar-local gamegrid-use-color t
"Non-nil means use color when available.")
-(defvar gamegrid-font "-*-courier-medium-r-*-*-*-140-100-75-*-*-iso8859-*"
+(defvar-local gamegrid-font "-*-courier-medium-r-*-*-*-140-100-75-*-*-iso8859-*"
"Name of the font used in X mode.")
-(defvar gamegrid-face nil
+(defvar-local gamegrid-face nil
"Indicates the face to use as a default.")
-(make-variable-buffer-local 'gamegrid-face)
-(defvar gamegrid-display-options nil)
+(defvar-local gamegrid-display-options nil)
-(defvar gamegrid-buffer-width 0)
-(defvar gamegrid-buffer-height 0)
-(defvar gamegrid-blank 0)
+(defvar-local gamegrid-buffer-width 0)
+(defvar-local gamegrid-buffer-height 0)
+(defvar-local gamegrid-blank 0)
-(defvar gamegrid-timer nil)
+(defvar-local gamegrid-timer nil)
-(defvar gamegrid-display-mode nil)
+(defvar-local gamegrid-display-mode nil)
-(defvar gamegrid-display-table)
+(defvar-local gamegrid-display-table nil)
-(defvar gamegrid-face-table nil)
+(defvar-local gamegrid-face-table nil)
-(defvar gamegrid-buffer-start 1)
+(defvar-local gamegrid-buffer-start 1)
-(defvar gamegrid-score-file-length 50
+(defvar-local gamegrid-score-file-length 50
"Number of high scores to keep.")
(defvar gamegrid-user-score-file-directory
@@ -66,19 +65,6 @@
If Emacs was built without support for shared game scores, then this
directory will be used.")
-(make-variable-buffer-local 'gamegrid-use-glyphs)
-(make-variable-buffer-local 'gamegrid-use-color)
-(make-variable-buffer-local 'gamegrid-font)
-(make-variable-buffer-local 'gamegrid-display-options)
-(make-variable-buffer-local 'gamegrid-buffer-width)
-(make-variable-buffer-local 'gamegrid-buffer-height)
-(make-variable-buffer-local 'gamegrid-blank)
-(make-variable-buffer-local 'gamegrid-timer)
-(make-variable-buffer-local 'gamegrid-display-mode)
-(make-variable-buffer-local 'gamegrid-display-table)
-(make-variable-buffer-local 'gamegrid-face-table)
-(make-variable-buffer-local 'gamegrid-buffer-start)
-(make-variable-buffer-local 'gamegrid-score-file-length)
;; ;;;;;;;;;;;;; global variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el
index 1a1d2d76520..be39e1ebfb0 100644
--- a/lisp/play/gametree.el
+++ b/lisp/play/gametree.el
@@ -79,7 +79,6 @@
;;; Code:
-(require 'derived)
(require 'outline)
;;;; Configuration variables
diff --git a/lisp/play/snake.el b/lisp/play/snake.el
index 5584bf88103..bed7cea6ee5 100644
--- a/lisp/play/snake.el
+++ b/lisp/play/snake.el
@@ -140,14 +140,14 @@
;; ;;;;;;;;;;;;; variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar snake-length 0)
-(defvar snake-velocity-x 1)
-(defvar snake-velocity-y 0)
-(defvar snake-positions nil)
-(defvar snake-score 0)
-(defvar snake-paused nil)
-(defvar snake-moved-p nil)
-(defvar snake-velocity-queue nil
+(defvar-local snake-length 0)
+(defvar-local snake-velocity-x 1)
+(defvar-local snake-velocity-y 0)
+(defvar-local snake-positions nil)
+(defvar-local snake-score 0)
+(defvar-local snake-paused nil)
+(defvar-local snake-moved-p nil)
+(defvar-local snake-velocity-queue nil
"This queue stores the velocities requested too quickly by user.
They will take effect one at a time at each clock-interval.
This is necessary for proper behavior.
@@ -158,16 +158,6 @@ we implemented all your keystrokes immediately, the snake would
effectively never move up. Thus, we need to move it up for one turn
and then start moving it leftwards.")
-
-(make-variable-buffer-local 'snake-length)
-(make-variable-buffer-local 'snake-velocity-x)
-(make-variable-buffer-local 'snake-velocity-y)
-(make-variable-buffer-local 'snake-positions)
-(make-variable-buffer-local 'snake-score)
-(make-variable-buffer-local 'snake-paused)
-(make-variable-buffer-local 'snake-moved-p)
-(make-variable-buffer-local 'snake-velocity-queue)
-
;; ;;;;;;;;;;;;; keymaps ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar snake-mode-map
diff --git a/lisp/play/tetris.el b/lisp/play/tetris.el
index 8205d3f79c5..05e4ffe0111 100644
--- a/lisp/play/tetris.el
+++ b/lisp/play/tetris.el
@@ -224,25 +224,15 @@ each one of its four blocks.")
;; ;;;;;;;;;;;;; variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar tetris-shape 0)
-(defvar tetris-rot 0)
-(defvar tetris-next-shape 0)
-(defvar tetris-n-shapes 0)
-(defvar tetris-n-rows 0)
-(defvar tetris-score 0)
-(defvar tetris-pos-x 0)
-(defvar tetris-pos-y 0)
-(defvar tetris-paused nil)
-
-(make-variable-buffer-local 'tetris-shape)
-(make-variable-buffer-local 'tetris-rot)
-(make-variable-buffer-local 'tetris-next-shape)
-(make-variable-buffer-local 'tetris-n-shapes)
-(make-variable-buffer-local 'tetris-n-rows)
-(make-variable-buffer-local 'tetris-score)
-(make-variable-buffer-local 'tetris-pos-x)
-(make-variable-buffer-local 'tetris-pos-y)
-(make-variable-buffer-local 'tetris-paused)
+(defvar-local tetris-shape 0)
+(defvar-local tetris-rot 0)
+(defvar-local tetris-next-shape 0)
+(defvar-local tetris-n-shapes 0)
+(defvar-local tetris-n-rows 0)
+(defvar-local tetris-score 0)
+(defvar-local tetris-pos-x 0)
+(defvar-local tetris-pos-y 0)
+(defvar-local tetris-paused nil)
;; ;;;;;;;;;;;;; keymaps ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 2c1e6ff52ec..614ed7d835d 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -953,13 +953,11 @@ Faces `compilation-error-face', `compilation-warning-face',
:type 'boolean
:version "23.1")
-(defvar compilation-auto-jump-to-next nil
+(defvar-local compilation-auto-jump-to-next nil
"If non-nil, automatically jump to the next error encountered.")
-(make-variable-buffer-local 'compilation-auto-jump-to-next)
-;; (defvar compilation-buffer-modtime nil
+;; (defvar-local compilation-buffer-modtime nil
;; "The buffer modification time, for buffers not associated with files.")
-;; (make-variable-buffer-local 'compilation-buffer-modtime)
(defvar compilation-skip-to-next-location t
"If non-nil, skip multiple error messages for the same source location.")
@@ -1087,13 +1085,12 @@ from a different message."
(:conc-name compilation--message->))
loc type end-loc rule)
-(defvar compilation--previous-directory-cache nil
+(defvar-local compilation--previous-directory-cache nil
"A pair (POS . RES) caching the result of previous directory search.
Basically, this pair says that calling
(previous-single-property-change POS \\='compilation-directory)
returned RES, i.e. there is no change of `compilation-directory' between
POS and RES.")
-(make-variable-buffer-local 'compilation--previous-directory-cache)
(defun compilation--flush-directory-cache (start _end)
(cond
@@ -1600,8 +1597,7 @@ to `compilation-error-regexp-alist' if RULES is nil."
(match-beginning mn) (match-end mn)
'font-lock-face (cadr props)))))))))
-(defvar compilation--parsed -1)
-(make-variable-buffer-local 'compilation--parsed)
+(defvar-local compilation--parsed -1)
(defun compilation--ensure-parse (limit)
"Make sure the text has been parsed up to LIMIT."
@@ -2673,9 +2669,8 @@ This is the value of `next-error-function' in Compilation buffers."
(compilation--loc->marker end-loc))
(setf (compilation--loc->visited loc) t)))
-(defvar compilation-gcpro nil
+(defvar-local compilation-gcpro nil
"Internal variable used to keep some values from being GC'd.")
-(make-variable-buffer-local 'compilation-gcpro)
(defun compilation-fake-loc (marker file &optional line col)
"Preassociate MARKER with FILE.
diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el
index 4ea1674db02..b2c2e8dab57 100644
--- a/lisp/progmodes/cpp.el
+++ b/lisp/progmodes/cpp.el
@@ -112,9 +112,8 @@ If nil, `cpp-progress-message' prints no progress messages."
:group 'cpp
:version "26.1")
-(defvar cpp-overlay-list nil)
-;; List of cpp overlays active in the current buffer.
-(make-variable-buffer-local 'cpp-overlay-list)
+(defvar-local cpp-overlay-list nil
+ "List of cpp overlays active in the current buffer.")
(defvar cpp-callback-data)
(defvar cpp-state-stack)
@@ -134,9 +133,8 @@ If nil, `cpp-progress-message' prints no progress messages."
(defvar cpp-button-event nil)
;; This will be t in the callback for `cpp-make-button'.
-(defvar cpp-edit-buffer nil)
-;; Real buffer whose cpp display information we are editing.
-(make-variable-buffer-local 'cpp-edit-buffer)
+(defvar-local cpp-edit-buffer nil
+ "Real buffer whose cpp display information we are editing.")
(defconst cpp-branch-list
;; Alist of branches.
@@ -211,9 +209,8 @@ or a cons cell (background-color . COLOR)."
;;; Parse Buffer:
-(defvar cpp-parse-symbols nil
+(defvar-local cpp-parse-symbols nil
"List of cpp macros used in the local buffer.")
-(make-variable-buffer-local 'cpp-parse-symbols)
(defconst cpp-parse-regexp
;; Regexp matching all tokens needed to find conditionals.
@@ -471,9 +468,8 @@ A prefix arg suppresses display of that buffer."
-(defvar cpp-edit-symbols nil)
-;; Symbols defined in the edit buffer.
-(make-variable-buffer-local 'cpp-edit-symbols)
+(defvar-local cpp-edit-symbols nil
+ "Symbols defined in the edit buffer.")
(define-derived-mode cpp-edit-mode fundamental-mode "CPP Edit"
"Major mode for editing the criteria for highlighting cpp conditionals.
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index 6f9509d152b..b376423c185 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -2941,16 +2941,11 @@ See `ebnf-style-database' documentation."
(defvar ebnf-eps-executing nil)
(defvar ebnf-eps-header-comment nil)
(defvar ebnf-eps-footer-comment nil)
-(defvar ebnf-eps-upper-x 0.0)
-(make-variable-buffer-local 'ebnf-eps-upper-x)
-(defvar ebnf-eps-upper-y 0.0)
-(make-variable-buffer-local 'ebnf-eps-upper-y)
-(defvar ebnf-eps-prod-width 0.0)
-(make-variable-buffer-local 'ebnf-eps-prod-width)
-(defvar ebnf-eps-max-height 0.0)
-(make-variable-buffer-local 'ebnf-eps-max-height)
-(defvar ebnf-eps-max-width 0.0)
-(make-variable-buffer-local 'ebnf-eps-max-width)
+(defvar-local ebnf-eps-upper-x 0.0)
+(defvar-local ebnf-eps-upper-y 0.0)
+(defvar-local ebnf-eps-prod-width 0.0)
+(defvar-local ebnf-eps-max-height 0.0)
+(defvar-local ebnf-eps-max-width 0.0)
(defvar ebnf-eps-context nil
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 2641387986d..92b165bc641 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -926,9 +926,8 @@ then the presence of the token here allows a line-break before or
after the other character, where a break would not normally be
allowed. This minor issue currently only affects \"(/\" and \"/)\".")
-(defvar f90-cache-position nil
+(defvar-local f90-cache-position nil
"Temporary position used to speed up region operations.")
-(make-variable-buffer-local 'f90-cache-position)
;; Hideshow support.
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 259da2fd019..eb114acdabc 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -638,8 +638,7 @@ The option \"--fullname\" must be included in this value."
;; receive a chunk of text which looks like it might contain the
;; beginning of a marker, we save it here between calls to the
;; filter.
-(defvar gud-marker-acc "")
-(make-variable-buffer-local 'gud-marker-acc)
+(defvar-local gud-marker-acc "")
(defun gud-gdb-marker-filter (string)
(setq gud-marker-acc (concat gud-marker-acc string))
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 33bea59e3ba..cdf6536fc7e 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -717,26 +717,20 @@ This variable is like `sgml-attribute-offset'."
table)
"Syntax table for `js-mode'.")
-(defvar js--quick-match-re nil
+(defvar-local js--quick-match-re nil
"Autogenerated regexp used by `js-mode' to match buffer constructs.")
-(defvar js--quick-match-re-func nil
+(defvar-local js--quick-match-re-func nil
"Autogenerated regexp used by `js-mode' to match constructs and functions.")
-(make-variable-buffer-local 'js--quick-match-re)
-(make-variable-buffer-local 'js--quick-match-re-func)
-
-(defvar js--cache-end 1
+(defvar-local js--cache-end 1
"Last valid buffer position for the `js-mode' function cache.")
-(make-variable-buffer-local 'js--cache-end)
-(defvar js--last-parse-pos nil
+(defvar-local js--last-parse-pos nil
"Latest parse position reached by `js--ensure-cache'.")
-(make-variable-buffer-local 'js--last-parse-pos)
-(defvar js--state-at-last-parse-pos nil
+(defvar-local js--state-at-last-parse-pos nil
"Parse state at `js--last-parse-pos'.")
-(make-variable-buffer-local 'js--state-at-last-parse-pos)
(defun js--maybe-join (prefix separator suffix &rest list)
"Helper function for `js--update-quick-match-re'.
@@ -1505,8 +1499,7 @@ REGEXPS, but only if FRAMEWORK is in `js-enabled-frameworks'."
(when (memq (quote ,framework) js-enabled-frameworks)
(re-search-forward ,regexps limit t)))))
-(defvar js--tmp-location nil)
-(make-variable-buffer-local 'js--tmp-location)
+(defvar-local js--tmp-location nil)
(defun js--forward-destructuring-spec (&optional func)
"Move forward over a JavaScript destructuring spec.
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el
index a14a8d75a78..c37bb1c7112 100644
--- a/lisp/progmodes/octave.el
+++ b/lisp/progmodes/octave.el
@@ -964,8 +964,7 @@ output is passed to the filter `inferior-octave-output-digest'."
(setq list (cdr list)))
(set-process-filter proc filter))))
-(defvar inferior-octave-directory-tracker-resync nil)
-(make-variable-buffer-local 'inferior-octave-directory-tracker-resync)
+(defvar-local inferior-octave-directory-tracker-resync nil)
(defun inferior-octave-directory-tracker (string)
"Tracks `cd' commands issued to the inferior Octave process.
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index fd689527676..f588ad99c9d 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -541,10 +541,9 @@ sign. See `sh-feature'."
:group 'sh-script)
-(defvar sh-header-marker nil
+(defvar-local sh-header-marker nil
"When non-nil is the end of header for prepending by \\[sh-execute-region].
That command is also used for setting this variable.")
-(make-variable-buffer-local 'sh-header-marker)
(defcustom sh-beginning-of-command
"\\([;({`|&]\\|\\`\\|[^\\]\n\\)[ \t]*\\([/~[:alnum:]:]\\)"
diff --git a/lisp/simple.el b/lisp/simple.el
index 742fc5004dc..e4a363a9a59 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -134,10 +134,9 @@ messages are highlighted; this helps to see what messages were visited."
:group 'next-error
:version "28.1")
-(defvar next-error--message-highlight-overlay
+(defvar-local next-error--message-highlight-overlay
nil
"Overlay highlighting the current error message in the `next-error' buffer.")
-(make-variable-buffer-local 'next-error--message-highlight-overlay)
(defcustom next-error-hook nil
"List of hook functions run by `next-error' after visiting source file."
@@ -165,15 +164,14 @@ A buffer becomes most recent when its compilation, grep, or
similar mode is started, or when it is used with \\[next-error]
or \\[compile-goto-error].")
-(defvar next-error-buffer nil
+(defvar-local next-error-buffer nil
"The buffer-local value of the most recent `next-error' buffer.")
;; next-error-buffer is made buffer-local to keep the reference
;; to the parent buffer used to navigate to the current buffer, so the
;; next call of next-buffer will use the same parent buffer to
;; continue navigation from it.
-(make-variable-buffer-local 'next-error-buffer)
-(defvar next-error-function nil
+(defvar-local next-error-function nil
"Function to use to find the next error in the current buffer.
The function is called with 2 parameters:
ARG is an integer specifying by how many errors to move.
@@ -182,15 +180,13 @@ of the errors before moving.
Major modes providing compile-like functionality should set this variable
to indicate to `next-error' that this is a candidate buffer and how
to navigate in it.")
-(make-variable-buffer-local 'next-error-function)
-(defvar next-error-move-function nil
+(defvar-local next-error-move-function nil
"Function to use to move to an error locus.
It takes two arguments, a buffer position in the error buffer
and a buffer position in the error locus buffer.
The buffer for the error locus should already be current.
nil means use goto-char using the second argument position.")
-(make-variable-buffer-local 'next-error-move-function)
(defsubst next-error-buffer-p (buffer
&optional avoid-current
@@ -1268,9 +1264,8 @@ that uses or sets the mark."
;; Counting lines, one way or another.
-(defvar goto-line-history nil
+(defvar-local goto-line-history nil
"History of values entered with `goto-line'.")
-(make-variable-buffer-local 'goto-line-history)
(defun goto-line-read-args (&optional relative)
"Read arguments for `goto-line' related commands."
@@ -2309,14 +2304,12 @@ once. In special cases, when this function needs to be called more
than once, it can set `minibuffer-default-add-done' to nil explicitly,
overriding the setting of this variable to t in `goto-history-element'.")
-(defvar minibuffer-default-add-done nil
+(defvar-local minibuffer-default-add-done nil
"When nil, add more elements to the end of the list of default values.
The value nil causes `goto-history-element' to add more elements to
the list of defaults when it reaches the end of this list. It does
this by calling a function defined by `minibuffer-default-add-function'.")
-(make-variable-buffer-local 'minibuffer-default-add-done)
-
(defun minibuffer-default-add-completions ()
"Return a list of all completions without the default value.
This function is used to add all elements of the completion table to
@@ -3480,13 +3473,12 @@ excessively long before answering the question."
:group 'undo
:version "22.1")
-(defvar undo-extra-outer-limit nil
+(defvar-local undo-extra-outer-limit nil
"If non-nil, an extra level of size that's ok in an undo item.
We don't ask the user about truncating the undo list until the
current item gets bigger than this amount.
This variable matters only if `undo-ask-before-discard' is non-nil.")
-(make-variable-buffer-local 'undo-extra-outer-limit)
;; When the first undo batch in an undo list is longer than
;; undo-outer-limit, this function gets called to warn the user that
diff --git a/lisp/subr.el b/lisp/subr.el
index 34129ea38a0..a85f41d7d77 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1701,6 +1701,7 @@ be a list of the form returned by `event-start' and `event-end'."
(make-obsolete-variable 'redisplay-dont-pause nil "24.5")
(make-obsolete 'window-redisplay-end-trigger nil "23.1")
(make-obsolete 'set-window-redisplay-end-trigger nil "23.1")
+(make-obsolete-variable 'operating-system-release nil "28.1")
(make-obsolete 'run-window-configuration-change-hook nil "27.1")
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 7e556550daa..6720d82b471 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1308,8 +1308,7 @@ For more information, see the function `tab-switcher'."
(setq buffer-read-only t)
(current-buffer))))
-(defvar tab-switcher-column 3)
-(make-variable-buffer-local 'tab-switcher-column)
+(defvar-local tab-switcher-column 3)
(defvar tab-switcher-mode-map
(let ((map (make-keymap)))
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 94e9d5c5828..af1e388c2a3 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -374,9 +374,8 @@ prompting. If file is a directory perform a `find-file' on it."
(find-file f)
(push-mark (+ (point) (cadr (insert-file-contents f)))))))
-(defvar ns-select-overlay nil
+(defvar-local ns-select-overlay nil
"Overlay used to highlight areas in files requested by Nextstep apps.")
-(make-variable-buffer-local 'ns-select-overlay)
(defvar ns-input-line) ; nsterm.m
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index 50c00c95320..e66adb43e75 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -408,57 +408,43 @@ be in `artist-spray-chars', or spraying will behave strangely.")
;; Internal variables
;;
-(defvar artist-mode nil
- "Non-nil to enable `artist-mode' and nil to disable.")
-(make-variable-buffer-local 'artist-mode)
-
(defvar artist-mode-name " Artist"
"Name of Artist mode beginning with a space (appears in the mode-line).")
-(defvar artist-curr-go 'pen-line
+(defvar-local artist-curr-go 'pen-line
"Current selected graphics operation.")
-(make-variable-buffer-local 'artist-curr-go)
-(defvar artist-line-char-set nil
+(defvar-local artist-line-char-set nil
"Boolean to tell whether user has set some char to use when drawing lines.")
-(make-variable-buffer-local 'artist-line-char-set)
-(defvar artist-line-char nil
+(defvar-local artist-line-char nil
"Char to use when drawing lines.")
-(make-variable-buffer-local 'artist-line-char)
-(defvar artist-fill-char-set nil
+(defvar-local artist-fill-char-set nil
"Boolean to tell whether user has set some char to use when filling.")
-(make-variable-buffer-local 'artist-fill-char-set)
-(defvar artist-fill-char nil
+(defvar-local artist-fill-char nil
"Char to use when filling.")
-(make-variable-buffer-local 'artist-fill-char)
-(defvar artist-erase-char ?\s
+(defvar-local artist-erase-char ?\s
"Char to use when erasing.")
-(make-variable-buffer-local 'artist-erase-char)
-(defvar artist-default-fill-char ?.
+(defvar-local artist-default-fill-char ?.
"Char to use when a fill-char is required but none is set.")
-(make-variable-buffer-local 'artist-default-fill-char)
; This variable is not buffer local
(defvar artist-copy-buffer nil
"Copy buffer.")
-(defvar artist-draw-region-min-y 0
+(defvar-local artist-draw-region-min-y 0
"Line-number for top-most visited line for draw operation.")
-(make-variable-buffer-local 'artist-draw-region-min-y)
-(defvar artist-draw-region-max-y 0
+(defvar-local artist-draw-region-max-y 0
"Line-number for bottom-most visited line for draw operation.")
-(make-variable-buffer-local 'artist-draw-region-max-y)
-(defvar artist-borderless-shapes nil
+(defvar-local artist-borderless-shapes nil
"When non-nil, draw shapes without border.
The fill char is used instead, if it is set.")
-(make-variable-buffer-local 'artist-borderless-shapes)
(defvar artist-prev-next-op-alist nil
"Assoc list for looking up next and/or previous draw operation.
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 9186e520086..622853da456 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -71,9 +71,8 @@
"while")
"Additional identifiers that appear in the form @foo in SCSS.")
-(defvar css--at-ids css-at-ids
+(defvar-local css--at-ids css-at-ids
"List of at-rules for the current mode.")
-(make-variable-buffer-local 'css--at-ids)
(defconst css-bang-ids
'("important")
@@ -83,9 +82,8 @@
'("default" "global" "optional")
"Additional identifiers that appear in the form !foo in SCSS.")
-(defvar css--bang-ids css-bang-ids
+(defvar-local css--bang-ids css-bang-ids
"List of bang-rules for the current mode.")
-(make-variable-buffer-local 'css--bang-ids)
(defconst css-descriptor-ids
'("ascent" "baseline" "bbox" "cap-height" "centerline" "definition-src"
@@ -1374,9 +1372,8 @@ the string PROPERTY."
"List of HTML tags.
Used to provide completion of HTML tags in selectors.")
-(defvar css--nested-selectors-allowed nil
+(defvar-local css--nested-selectors-allowed nil
"Non-nil if nested selectors are allowed in the current mode.")
-(make-variable-buffer-local 'css--nested-selectors-allowed)
(defvar css-class-list-function #'ignore
"Called to provide completions of class names.
diff --git a/lisp/textmodes/enriched.el b/lisp/textmodes/enriched.el
index 1aac96413e4..bac209cdef6 100644
--- a/lisp/textmodes/enriched.el
+++ b/lisp/textmodes/enriched.el
@@ -165,10 +165,9 @@ execute malicious Lisp code, if that code came from an external source."
:version "26.1"
:group 'enriched)
-(defvar enriched-old-bindings nil
+(defvar-local enriched-old-bindings nil
"Store old variable values that we change when entering mode.
The value is a list of \(VAR VALUE VAR VALUE...).")
-(make-variable-buffer-local 'enriched-old-bindings)
;; The next variable is buffer local if and only if Enriched mode is
;; enabled. The buffer local value records whether
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index d8503168846..83dba7177ab 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -304,12 +304,11 @@ If this variable is nil, all regions are treated as small."
(define-obsolete-variable-alias 'flyspell-generic-check-word-p
'flyspell-generic-check-word-predicate "25.1")
-(defvar flyspell-generic-check-word-predicate nil
+(defvar-local flyspell-generic-check-word-predicate nil
"Function providing per-mode customization over which words are flyspelled.
Returns t to continue checking, nil otherwise.
Flyspell mode sets this variable to whatever is the `flyspell-mode-predicate'
property of the major mode name.")
-(make-variable-buffer-local 'flyspell-generic-check-word-predicate)
;;*--- mail mode -------------------------------------------------------*/
(put 'mail-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
@@ -466,13 +465,10 @@ If this is set, also unbind `mouse-2'."
:version "28.1")
;; dash character machinery
-(defvar flyspell-consider-dash-as-word-delimiter-flag nil
+(defvar-local flyspell-consider-dash-as-word-delimiter-flag nil
"Non-nil means that the `-' char is considered as a word delimiter.")
-(make-variable-buffer-local 'flyspell-consider-dash-as-word-delimiter-flag)
-(defvar flyspell-dash-dictionary nil)
-(make-variable-buffer-local 'flyspell-dash-dictionary)
-(defvar flyspell-dash-local-dictionary nil)
-(make-variable-buffer-local 'flyspell-dash-local-dictionary)
+(defvar-local flyspell-dash-dictionary nil)
+(defvar-local flyspell-dash-local-dictionary nil)
;;*---------------------------------------------------------------------*/
;;* Highlighting */
@@ -714,14 +710,10 @@ has been used, the current word is not checked."
;;*---------------------------------------------------------------------*/
;;* flyspell-word-cache ... */
;;*---------------------------------------------------------------------*/
-(defvar flyspell-word-cache-start nil)
-(defvar flyspell-word-cache-end nil)
-(defvar flyspell-word-cache-word nil)
-(defvar flyspell-word-cache-result '_)
-(make-variable-buffer-local 'flyspell-word-cache-start)
-(make-variable-buffer-local 'flyspell-word-cache-end)
-(make-variable-buffer-local 'flyspell-word-cache-word)
-(make-variable-buffer-local 'flyspell-word-cache-result)
+(defvar-local flyspell-word-cache-start nil)
+(defvar-local flyspell-word-cache-end nil)
+(defvar-local flyspell-word-cache-word nil)
+(defvar-local flyspell-word-cache-result '_)
;;*---------------------------------------------------------------------*/
;;* The flyspell pre-hook, store the current position. In the */
@@ -827,8 +819,7 @@ before the current command."
;;* the post command hook, we will check, if the word at this */
;;* position has to be spell checked. */
;;*---------------------------------------------------------------------*/
-(defvar flyspell-changes nil)
-(make-variable-buffer-local 'flyspell-changes)
+(defvar-local flyspell-changes nil)
;;*---------------------------------------------------------------------*/
;;* flyspell-after-change-function ... */
@@ -1894,14 +1885,10 @@ as returned by `ispell-parse-output'."
;;*---------------------------------------------------------------------*/
;;* flyspell-auto-correct-cache ... */
;;*---------------------------------------------------------------------*/
-(defvar flyspell-auto-correct-pos nil)
-(defvar flyspell-auto-correct-region nil)
-(defvar flyspell-auto-correct-ring nil)
-(defvar flyspell-auto-correct-word nil)
-(make-variable-buffer-local 'flyspell-auto-correct-pos)
-(make-variable-buffer-local 'flyspell-auto-correct-region)
-(make-variable-buffer-local 'flyspell-auto-correct-ring)
-(make-variable-buffer-local 'flyspell-auto-correct-word)
+(defvar-local flyspell-auto-correct-pos nil)
+(defvar-local flyspell-auto-correct-region nil)
+(defvar-local flyspell-auto-correct-ring nil)
+(defvar-local flyspell-auto-correct-word nil)
;;*---------------------------------------------------------------------*/
;;* flyspell-check-previous-highlighted-word ... */
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 8d49a7c54c8..ea46270508e 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -351,9 +351,8 @@ If nil, the default personal dictionary for your spelling checker is used."
:type 'boolean
:group 'ispell)
-(defvar ispell-local-dictionary-overridden nil
+(defvar-local ispell-local-dictionary-overridden nil
"Non-nil means the user has explicitly set this buffer's Ispell dictionary.")
-(make-variable-buffer-local 'ispell-local-dictionary-overridden)
(defcustom ispell-local-dictionary nil
"If non-nil, the dictionary to be used for Ispell commands in this buffer.
@@ -1748,7 +1747,7 @@ Note - substrings of other matches must come last
(e.g. \"<[tT][tT]/\" and \"<[^ \\t\\n>]\").")
(put 'ispell-html-skip-alists 'risky-local-variable t)
-(defvar ispell-local-pdict ispell-personal-dictionary
+(defvar-local ispell-local-pdict ispell-personal-dictionary
"A buffer local variable containing the current personal dictionary.
If non-nil, the value must be a string, which is a file name.
@@ -1758,18 +1757,15 @@ to calling \\[ispell-change-dictionary]. This variable is automatically
set when defined in the file with either `ispell-pdict-keyword' or the
local variable syntax.")
-(make-variable-buffer-local 'ispell-local-pdict)
;;;###autoload(put 'ispell-local-pdict 'safe-local-variable 'stringp)
(defvar ispell-buffer-local-name nil
"Contains the buffer name if local word definitions were used.
Ispell is then restarted because the local words could conflict.")
-(defvar ispell-buffer-session-localwords nil
+(defvar-local ispell-buffer-session-localwords nil
"List of words accepted for session in this buffer.")
-(make-variable-buffer-local 'ispell-buffer-session-localwords)
-
(defvar ispell-parser 'use-mode-name
"Indicates whether ispell should parse the current buffer as TeX Code.
Special value `use-mode-name' tries to guess using the name of `major-mode'.
diff --git a/lisp/textmodes/less-css-mode.el b/lisp/textmodes/less-css-mode.el
index 9cacc175ba9..24ccb3ce980 100644
--- a/lisp/textmodes/less-css-mode.el
+++ b/lisp/textmodes/less-css-mode.el
@@ -73,7 +73,6 @@
(require 'compile)
(require 'css-mode)
-(require 'derived)
(eval-when-compile (require 'subr-x))
(defgroup less-css nil
diff --git a/lisp/textmodes/refill.el b/lisp/textmodes/refill.el
index 6edd9aeb7ef..8f4f3c5a231 100644
--- a/lisp/textmodes/refill.el
+++ b/lisp/textmodes/refill.el
@@ -88,10 +88,9 @@
;;; "Refilling paragraphs on changes."
;;; :group 'fill)
-(defvar refill-ignorable-overlay nil
+(defvar-local refill-ignorable-overlay nil
"Portion of the most recently filled paragraph not needing filling.
This is used to optimize refilling.")
-(make-variable-buffer-local 'refill-ignorable-overlay)
(defun refill-adjust-ignorable-overlay (overlay afterp beg end &optional len)
"Adjust OVERLAY to not include the about-to-be-modified region."
@@ -149,7 +148,7 @@ This is used to optimize refilling.")
"Like `fill-paragraph' but don't delete whitespace at paragraph end."
(refill-fill-paragraph-at (point) arg))
-(defvar refill-doit nil
+(defvar-local refill-doit nil
"Non-nil tells `refill-post-command-function' to do its processing.
Set by `refill-after-change-function' in `after-change-functions' and
unset by `refill-post-command-function' in `post-command-hook', and
@@ -157,7 +156,6 @@ sometimes `refill-pre-command-function' in `pre-command-hook'. This
ensures refilling is only done once per command that causes a change,
regardless of the number of after-change calls from commands doing
complex processing.")
-(make-variable-buffer-local 'refill-doit)
(defun refill-after-change-function (beg end len)
"Function for `after-change-functions' which just sets `refill-doit'."
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index c50c544cb54..3e29f055ece 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -2290,19 +2290,17 @@ This takes effect when first loading the library.")
nil t)
(match-string-no-properties 1))))
-(defvar html--buffer-classes-cache nil
+(defvar-local html--buffer-classes-cache nil
"Cache for `html-current-buffer-classes'.
When set, this should be a cons cell where the CAR is the
buffer's tick counter (as produced by `buffer-modified-tick'),
and the CDR is the list of class names found in the buffer.")
-(make-variable-buffer-local 'html--buffer-classes-cache)
-(defvar html--buffer-ids-cache nil
+(defvar-local html--buffer-ids-cache nil
"Cache for `html-current-buffer-ids'.
When set, this should be a cons cell where the CAR is the
buffer's tick counter (as produced by `buffer-modified-tick'),
and the CDR is the list of class names found in the buffer.")
-(make-variable-buffer-local 'html--buffer-ids-cache)
(declare-function libxml-parse-html-region "xml.c"
(start end &optional base-url discard-comments))
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index 071684d3c4d..06785e458b2 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -859,11 +859,10 @@ cell to cache and cache to cell.")
"Non-nil inhibits auto fill paragraph when `table-with-cache-buffer' exits.
This is always set to nil at the entry to `table-with-cache-buffer' before
executing body forms.")
-(defvar table-mode-indicator nil
+(defvar-local table-mode-indicator nil
"For mode line indicator")
;; This is not a real minor-mode but placed in the minor-mode-alist
;; so that we can show the indicator on the mode line handy.
-(make-variable-buffer-local 'table-mode-indicator)
(unless (assq table-mode-indicator minor-mode-alist)
(push '(table-mode-indicator (table-fixed-width-mode " Fixed-Table" " Table"))
minor-mode-alist))
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index ce665e61656..d5a79ad0ac5 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -2044,8 +2044,7 @@ In the tex shell buffer this command behaves like `comint-send-input'."
(with-current-buffer buffer
(setq default-directory directory))))
-(defvar tex-send-command-modified-tick 0)
-(make-variable-buffer-local 'tex-send-command-modified-tick)
+(defvar-local tex-send-command-modified-tick 0)
(defun tex-shell-proc ()
(or (tex-shell-running) (error "No TeX subprocess")))
diff --git a/lisp/textmodes/two-column.el b/lisp/textmodes/two-column.el
index 36aad84c0e6..d072ab16c3c 100644
--- a/lisp/textmodes/two-column.el
+++ b/lisp/textmodes/two-column.el
@@ -218,15 +218,13 @@ minus this value."
;; Markers seem to be the only buffer-id not affected by renaming a buffer.
;; This nevertheless loses when a buffer is killed. The variable-name is
;; required by `describe-mode'.
-(defvar 2C-mode nil
+(defvar-local 2C-mode nil
"Marker to the associated buffer, if non-nil.")
-(make-variable-buffer-local '2C-mode)
(put '2C-mode 'permanent-local t)
(setq minor-mode-alist (cons '(2C-mode " 2C") minor-mode-alist))
-(defvar 2C-autoscroll-start nil)
-(make-variable-buffer-local '2C-autoscroll-start)
+(defvar-local 2C-autoscroll-start nil)
;;;;; base functions ;;;;;
diff --git a/lisp/vc/ediff-diff.el b/lisp/vc/ediff-diff.el
index e90eaa11565..fde9d4338f3 100644
--- a/lisp/vc/ediff-diff.el
+++ b/lisp/vc/ediff-diff.el
@@ -1230,35 +1230,30 @@ are ignored."
Used for splitting difference regions into individual words.")
;; \240 is Unicode symbol for nonbreakable whitespace
-(defvar ediff-whitespace " \n\t\f\r\240"
+(defvar-local ediff-whitespace " \n\t\f\r\240"
"Characters constituting white space.
These characters are ignored when differing regions are split into words.")
-(make-variable-buffer-local 'ediff-whitespace)
-(defvar ediff-word-1 "-[:word:]_"
+(defvar-local ediff-word-1 "-[:word:]_"
"Characters that constitute words of type 1.
More precisely, [ediff-word-1] is a regexp that matches type 1 words.
See `ediff-forward-word' for more details.")
-(make-variable-buffer-local 'ediff-word-1)
-(defvar ediff-word-2 "0-9.,"
+(defvar-local ediff-word-2 "0-9.,"
"Characters that constitute words of type 2.
More precisely, [ediff-word-2] is a regexp that matches type 2 words.
See `ediff-forward-word' for more details.")
-(make-variable-buffer-local 'ediff-word-2)
-(defvar ediff-word-3 "`'?!:;\"{}[]()"
+(defvar-local ediff-word-3 "`'?!:;\"{}[]()"
"Characters that constitute words of type 3.
More precisely, [ediff-word-3] is a regexp that matches type 3 words.
See `ediff-forward-word' for more details.")
-(make-variable-buffer-local 'ediff-word-3)
-(defvar ediff-word-4
+(defvar-local ediff-word-4
(concat "^" ediff-word-1 ediff-word-2 ediff-word-3 ediff-whitespace)
"Characters that constitute words of type 4.
More precisely, [ediff-word-4] is a regexp that matches type 4 words.
See `ediff-forward-word' for more details.")
-(make-variable-buffer-local 'ediff-word-4)
;; Split region along word boundaries. Each word will be on its own line.
;; Output to buffer out-buffer.
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 0865ac5ce41..c20d03c83d6 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -80,13 +80,12 @@ that Ediff doesn't know about.")
;; so that `kill-all-local-variables' (called by major-mode setting
;; commands) won't destroy Ediff control variables.
;;
-;; Plagiarized from `emerge-defvar-local' for XEmacs.
+;; Plagiarized from `emerge-defvar-local'.
(defmacro ediff-defvar-local (var value doc)
"Defines VAR as a local variable."
(declare (indent defun) (doc-string 3))
`(progn
- (defvar ,var ,value ,doc)
- (make-variable-buffer-local ',var)
+ (defvar-local ,var ,value ,doc)
(put ',var 'permanent-local t)))
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index 3b09dfe5d2e..f50b2540c55 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -173,8 +173,7 @@ Used in `smerge-diff-base-upper' and related functions."
`((,smerge-command-prefix . ,smerge-basic-map))
"Keymap for `smerge-mode'.")
-(defvar smerge-check-cache nil)
-(make-variable-buffer-local 'smerge-check-cache)
+(defvar-local smerge-check-cache nil)
(defun smerge-check (n)
(condition-case nil
(let ((state (cons (point) (buffer-modified-tick))))
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index e4eff486f5e..c495afb6ec5 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -860,9 +860,8 @@ If LIMIT is non-nil, show no more than this many entries."
(vc-bzr-command "mv" nil 0 new old)
(message "Renamed %s => %s" old new))
-(defvar vc-bzr-annotation-table nil
+(defvar-local vc-bzr-annotation-table nil
"Internal use.")
-(make-variable-buffer-local 'vc-bzr-annotation-table)
(defun vc-bzr-annotate-command (file buffer &optional revision)
"Prepare BUFFER for `vc-annotate' on FILE.
diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 6b17f2afe74..2573964c42c 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -531,8 +531,7 @@ ARG and NO-CONFIRM are passed on to `revert-buffer'."
(revert-buffer arg no-confirm t))
(vc-restore-buffer-context context)))
-(defvar vc-mode-line-hook nil)
-(make-variable-buffer-local 'vc-mode-line-hook)
+(defvar-local vc-mode-line-hook nil)
(put 'vc-mode-line-hook 'permanent-local t)
(defvar view-old-buffer-read-only)
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index bc9f11202b1..00976a07d42 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1549,6 +1549,9 @@ After check-out, runs the normal hook `vc-checkout-hook'."
(vc-call-backend backend 'mark-resolved files)
;; FIXME: Is this TRTD? Might not be.
`((vc-state . edited)))
+ ;; Recompute mode lines.
+ (dolist (file files)
+ (vc-mode-line file backend))
(message
(substitute-command-keys
"Conflicts have been resolved in %s. \
diff --git a/lisp/window.el b/lisp/window.el
index d5876914201..8905d4a826e 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1500,7 +1500,7 @@ otherwise."
(window-pixel-height window)
(window-total-height window round))))
-(defvar window-size-fixed nil
+(defvar-local window-size-fixed nil
"Non-nil in a buffer means windows displaying the buffer are fixed-size.
If the value is `height', then only the window's height is fixed.
If the value is `width', then only the window's width is fixed.
@@ -1509,7 +1509,6 @@ Any other non-nil value fixes both the width and the height.
Emacs won't change the size of any window displaying that buffer,
unless it has no other choice (like when deleting a neighboring
window).")
-(make-variable-buffer-local 'window-size-fixed)
(defun window--preservable-size (window &optional horizontal)
"Return height of WINDOW as `window-preserve-size' would preserve it.
@@ -5753,11 +5752,10 @@ nil (i.e. any), `height' or `width'."
'((height . width) (width . height))))))))
;;; A different solution to balance-windows.
-(defvar window-area-factor 1
+(defvar-local window-area-factor 1
"Factor by which the window area should be over-estimated.
This is used by `balance-windows-area'.
Changing this globally has no effect.")
-(make-variable-buffer-local 'window-area-factor)
(defun balance-windows-area-adjust (window delta horizontal pixelwise)
"Wrapper around `window-resize' with error checking.
@@ -9580,8 +9578,7 @@ buffers displaying right to left text."
;; status is undone only when explicitly programmed, not when a buffer
;; is reverted or a mode function is called.
-(defvar window-group-start-function nil)
-(make-variable-buffer-local 'window-group-start-function)
+(defvar-local window-group-start-function nil)
(put 'window-group-start-function 'permanent-local t)
(defun window-group-start (&optional window)
"Return position at which display currently starts in the group of
@@ -9594,8 +9591,7 @@ This is updated by redisplay or by calling `set-window*-start'."
(funcall window-group-start-function window)
(window-start window)))
-(defvar window-group-end-function nil)
-(make-variable-buffer-local 'window-group-end-function)
+(defvar-local window-group-end-function nil)
(put 'window-group-end-function 'permanent-local t)
(defun window-group-end (&optional window update)
"Return position at which display currently ends in the group of
@@ -9614,8 +9610,7 @@ if it isn't already recorded."
(funcall window-group-end-function window update)
(window-end window update)))
-(defvar set-window-group-start-function nil)
-(make-variable-buffer-local 'set-window-group-start-function)
+(defvar-local set-window-group-start-function nil)
(put 'set-window-group-start-function 'permanent-local t)
(defun set-window-group-start (window pos &optional noforce)
"Make display in the group of windows containing WINDOW start at
@@ -9629,8 +9624,7 @@ overriding motion of point in order to display at this exact start."
(funcall set-window-group-start-function window pos noforce)
(set-window-start window pos noforce)))
-(defvar recenter-window-group-function nil)
-(make-variable-buffer-local 'recenter-window-group-function)
+(defvar-local recenter-window-group-function nil)
(put 'recenter-window-group-function 'permanent-local t)
(defun recenter-window-group (&optional arg)
"Center point in the group of windows containing the selected window
@@ -9656,8 +9650,7 @@ and redisplay normally--don't erase and redraw the frame."
(funcall recenter-window-group-function arg)
(recenter arg)))
-(defvar pos-visible-in-window-group-p-function nil)
-(make-variable-buffer-local 'pos-visible-in-window-group-p-function)
+(defvar-local pos-visible-in-window-group-p-function nil)
(put 'pos-visible-in-window-group-p-function 'permanent-local t)
(defun pos-visible-in-window-group-p (&optional pos window partially)
"Return non-nil if position POS is currently on the frame in the
@@ -9687,8 +9680,7 @@ POS, ROWH is the visible height of that row, and VPOS is the row number
(funcall pos-visible-in-window-group-p-function pos window partially)
(pos-visible-in-window-p pos window partially)))
-(defvar selected-window-group-function nil)
-(make-variable-buffer-local 'selected-window-group-function)
+(defvar-local selected-window-group-function nil)
(put 'selected-window-group-function 'permanent-local t)
(defun selected-window-group ()
"Return the list of windows in the group containing the selected window.
@@ -9698,8 +9690,7 @@ result is a list containing only the selected window."
(funcall selected-window-group-function)
(list (selected-window))))
-(defvar move-to-window-group-line-function nil)
-(make-variable-buffer-local 'move-to-window-group-line-function)
+(defvar-local move-to-window-group-line-function nil)
(put 'move-to-window-group-line-function 'permanent-local t)
(defun move-to-window-group-line (arg)
"Position point relative to the current group of windows.
diff --git a/src/macros.c b/src/macros.c
index c8ce94e63b1..60d0766a754 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -279,7 +279,10 @@ its function definition is used.
COUNT is a repeat count, or nil for once, or 0 for infinite loop.
Optional third arg LOOPFUNC may be a function that is called prior to
-each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
+each iteration of the macro. Iteration stops if LOOPFUNC returns nil.
+
+The buffer shown in the currently selected window will be made the current
+buffer before the macro is executed. */)
(Lisp_Object macro, Lisp_Object count, Lisp_Object loopfunc)
{
Lisp_Object final;
diff --git a/src/minibuf.c b/src/minibuf.c
index 5df10453739..949c3d989d5 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -594,6 +594,18 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
record_unwind_protect (restore_buffer, Fcurrent_buffer ());
choose_minibuf_frame ();
+ mini_frame = WINDOW_FRAME (XWINDOW (minibuf_window));
+
+ if (minibuf_level > 1
+ && minibuf_moves_frame_when_opened ()
+ && !minibuf_follows_frame ())
+ {
+ EMACS_INT i;
+
+ /* Stack up the existing minibuffers on the current mini-window */
+ for (i = 1; i < minibuf_level; i++)
+ set_window_buffer (minibuf_window, nth_minibuffer (i), 0, 0);
+ }
record_unwind_protect_void (choose_minibuf_frame);
@@ -602,7 +614,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
/* If the minibuffer window is on a different frame, save that
frame's configuration too. */
- mini_frame = WINDOW_FRAME (XWINDOW (minibuf_window));
if (!EQ (mini_frame, selected_frame))
record_unwind_protect (restore_window_configuration,
Fcons (/* Arrange for the frame later to be
@@ -745,17 +756,6 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
}
}
- if (minibuf_moves_frame_when_opened ())
- {
- EMACS_INT i;
-
- /* Stack up all the (recursively) open minibuffers on the selected
- mini_window. */
- for (i = 1; i < minibuf_level; i++)
- set_window_buffer (XFRAME (mini_frame)->minibuffer_window,
- nth_minibuffer (i), 0, 0);
- }
-
/* Display this minibuffer in the proper window. */
/* Use set_window_buffer instead of Fset_window_buffer (see
discussion of bug#11984, bug#12025, bug#12026). */
@@ -926,6 +926,31 @@ nth_minibuffer (EMACS_INT depth)
return XCAR (tail);
}
+/* Set the major mode of the minibuffer BUF, depending on DEPTH, the
+ minibuffer depth. */
+
+static void
+set_minibuffer_mode (Lisp_Object buf, EMACS_INT depth)
+{
+ ptrdiff_t count = SPECPDL_INDEX ();
+
+ record_unwind_current_buffer ();
+ Fset_buffer (buf);
+ if (depth > 0)
+ {
+ if (!NILP (Ffboundp (intern ("fundamental-mode"))))
+ call0 (intern ("fundamental-mode"));
+ }
+ else
+ {
+ if (!NILP (Ffboundp (intern ("minibuffer-inactive-mode"))))
+ call0 (intern ("minibuffer-inactive-mode"));
+ else
+ Fkill_all_local_variables ();
+ }
+ buf = unbind_to (count, buf);
+}
+
/* Return a buffer to be used as the minibuffer at depth `depth'.
depth = 0 is the lowest allowed argument, and that is the value
used for nonrecursive minibuffer invocations. */
@@ -946,28 +971,21 @@ get_minibuffer (EMACS_INT depth)
char name[sizeof name_fmt + INT_STRLEN_BOUND (EMACS_INT)];
AUTO_STRING_WITH_LEN (lname, name, sprintf (name, name_fmt, depth));
buf = Fget_buffer_create (lname, Qnil);
-
+ /* Do this before set_minibuffer_mode. */
+ XSETCAR (tail, buf);
+ set_minibuffer_mode (buf, depth);
/* Although the buffer's name starts with a space, undo should be
enabled in it. */
Fbuffer_enable_undo (buf);
-
- XSETCAR (tail, buf);
}
else
{
- ptrdiff_t count = SPECPDL_INDEX ();
/* We have to empty both overlay lists. Otherwise we end
up with overlays that think they belong to this buffer
while the buffer doesn't know about them any more. */
delete_all_overlays (XBUFFER (buf));
reset_buffer (XBUFFER (buf));
- record_unwind_current_buffer ();
- Fset_buffer (buf);
- if (!NILP (Ffboundp (intern ("minibuffer-inactive-mode"))))
- call0 (intern ("minibuffer-inactive-mode"));
- else
- Fkill_all_local_variables ();
- buf = unbind_to (count, buf);
+ set_minibuffer_mode (buf, depth);
}
return buf;
diff --git a/src/nsmenu.m b/src/nsmenu.m
index f8219d27026..24aa5a0ac11 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -405,7 +405,7 @@ ns_update_menubar (struct frame *f, bool deep_p)
frame's menus have changed, and the *step representation should be updated
from Lisp. */
void
-set_frame_menubar (struct frame *f, bool first_time, bool deep_p)
+set_frame_menubar (struct frame *f, bool deep_p)
{
ns_update_menubar (f, deep_p);
}
@@ -1795,7 +1795,7 @@ DEFUN ("ns-reset-menu", Fns_reset_menu, Sns_reset_menu, 0, 0, 0,
doc: /* Cause the NS menu to be re-calculated. */)
(void)
{
- set_frame_menubar (SELECTED_FRAME (), 1, 0);
+ set_frame_menubar (SELECTED_FRAME (), 0);
return Qnil;
}
diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el
index 3ebca14a284..7349b191caf 100644
--- a/test/lisp/minibuffer-tests.el
+++ b/test/lisp/minibuffer-tests.el
@@ -1,4 +1,4 @@
-;;; completion-tests.el --- Tests for completion functions -*- lexical-binding: t; -*-
+;;; minibuffer-tests.el --- Tests for completion functions -*- lexical-binding: t; -*-
;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
@@ -107,5 +107,23 @@
nil (length input))
(cons output (length output)))))))
-(provide 'completion-tests)
-;;; completion-tests.el ends here
+(ert-deftest completion--insert-strings-faces ()
+ (with-temp-buffer
+ (completion--insert-strings
+ '(("completion1" "suffix1")))
+ (should (equal (get-text-property 12 'face) '(completions-annotations))))
+ (with-temp-buffer
+ (completion--insert-strings
+ '(("completion1" #("suffix1" 0 7 (face shadow)))))
+ (should (equal (get-text-property 12 'face) 'shadow)))
+ (with-temp-buffer
+ (completion--insert-strings
+ '(("completion1" "prefix1" "suffix1")))
+ (should (equal (get-text-property 19 'face) nil)))
+ (with-temp-buffer
+ (completion--insert-strings
+ '(("completion1" "prefix1" #("suffix1" 0 7 (face shadow)))))
+ (should (equal (get-text-property 19 'face) 'shadow))))
+
+(provide 'minibuffer-tests)
+;;; minibuffer-tests.el ends here