else''. (There's an implicit @code{nil} element at the end.)
@end defmac
+@findex buffer-local-restore-state
@defmac buffer-local-set-state variable value...
-Minor modes often set buffer-local variables that alters some features
+Minor modes often set buffer-local variables that affect some features
in Emacs. When a minor mode is switched off, the mode is expected to
restore the previous state of these variables. This convenience macro
helps with doing that: It works much like @code{setq-local}, but
returns an object that can be used to restore these values back to
-their previous values/states (with the
-@code{buffer-local-restore-state} function).
+their previous values/states (using the companion function
+@code{buffer-local-restore-state}).
@end defmac
@node Mode Line Format
\f
(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))
;;;###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)