]> git.eshelyaron.com Git - emacs.git/commit
Add new helper macros for minor modes to restore variables
authorLars Ingebrigtsen <larsi@gnus.org>
Fri, 6 May 2022 11:10:45 +0000 (13:10 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 6 May 2022 11:10:45 +0000 (13:10 +0200)
commitb13356487fc3eaf82bfe51bee24ddf70c27c5834
tree4e3f91a3b0bfc416a40d6366365fdff8d232b65f
parent0bda1803bb83de41d4f1d55ee3e2437f2177c076
Add new helper macros for minor modes to restore variables

* doc/lispref/modes.texi (Defining Minor Modes): Document it.

* lisp/emacs-lisp/easy-mmode.el (buffer-local-set-state): New macro.
(buffer-local-set-state--get): Helper function.
(buffer-local-restore-state): New function.

* lisp/textmodes/word-wrap-mode.el (word-wrap-whitespace-mode):
Use it to simplify code.
doc/lispref/modes.texi
etc/NEWS
lisp/emacs-lisp/easy-mmode.el
lisp/textmodes/word-wrap-mode.el
test/lisp/emacs-lisp/easy-mmode-tests.el