mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Make second arg to defvar-local optional
This change allows declaring a variable both special
and buffer-local like so:
(defvar-local foo)
* lisp/subr.el (defvar-local): Make second argument optional.
* test/lisp/subr-tests.el (subr-test-defvar-local): New test.
* doc/lispref/variables.texi (Creating Buffer-Local): Document above change.
* etc/NEWS:
* lisp/mb-depth.el (minibuffer-depth-overlay):
* lisp/minibuf-eldef.el (minibuf-eldef-initial-input)
(minibuf-eldef-initial-buffer-length)
(minibuf-eldef-showing-default-in-prompt, minibuf-eldef-overlay):
* lisp/misc.el (list-dynamic-libraries--loaded-only-p):
* lisp/simple.el (minibuffer-history-isearch-message-overlay): Use
above new one-argument form of 'defvar-local'.
This commit is contained in:
parent
a6523599f9
commit
ce03bf252a
8 changed files with 35 additions and 20 deletions
|
|
@ -262,8 +262,7 @@ variation of `C-x M-c M-butterfly' from url `https://xkcd.com/378/'."
|
|||
;; A command to list dynamically loaded libraries. This useful in
|
||||
;; environments where dynamic-library-alist is used, i.e., Windows
|
||||
|
||||
(defvar list-dynamic-libraries--loaded-only-p)
|
||||
(make-variable-buffer-local 'list-dynamic-libraries--loaded-only-p)
|
||||
(defvar-local list-dynamic-libraries--loaded-only-p)
|
||||
|
||||
(defun list-dynamic-libraries--loaded (from)
|
||||
"Compute the \"Loaded from\" column.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue