1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; Improve documentation of 'buffer-local-set-state'

* lisp/emacs-lisp/easy-mmode.el (buffer-local-set-state)
(buffer-local-restore-state): Doc fixes.

* doc/lispref/modes.texi (Defining Minor Modes): Fix a typo and
improve wording and indexing.
This commit is contained in:
Eli Zaretskii 2022-05-06 15:15:27 +03:00
parent 7601a77d8a
commit 92bbe911e9
2 changed files with 9 additions and 8 deletions

View file

@ -827,9 +827,9 @@ Interactively, COUNT is the prefix numeric argument, and defaults to 1."
(defmacro buffer-local-set-state (&rest pairs)
"Like `setq-local', but return an object that allows restoring previous state.
Use `buffer-local-restore-state' on the returned object to
restore the state.
"Like `setq-local', but allow restoring the previous state of locals later.
This macro returns an object that can be passed to `buffer-local-restore-state'
in order to restore the state of the local variables set via this macro.
\(fn [VARIABLE VALUE]...)"
(declare (debug setq))
@ -854,8 +854,8 @@ restore the state.
;;;###autoload
(defun buffer-local-restore-state (states)
"Restore buffer local variable values in STATES.
STATES is an object returned by `buffer-local-set-state'."
"Restore values of buffer-local variables recorded in STATES.
STATES should be an object returned by `buffer-local-set-state'."
(pcase-dolist (`(,variable ,local ,value) states)
(if local
(set variable value)