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

Allow nil initializers in define-minor-mode

* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Make the
meaning of :initialize nil and a missing :initialize the same.
This commit is contained in:
Lars Ingebrigtsen 2021-07-30 18:25:12 +02:00
parent 12c5ca4d82
commit 02cbb37de7

View file

@ -251,7 +251,9 @@ INIT-VALUE LIGHTER KEYMAP.
(setq getter `(default-value ',mode))))
(:extra-args (setq extra-args (pop body)))
(:set (setq set (list :set (pop body))))
(:initialize (setq initialize (list :initialize (pop body))))
(:initialize
(when-let ((val (pop body)))
(setq initialize (list :initialize val))))
(:type (setq type (list :type (pop body))))
(:keymap (setq keymap (pop body)))
(:interactive (setq interactive (pop body)))