diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-30 18:25:12 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-07-31 12:35:45 +0200 |
commit | 02cbb37de73d563149389615ee44741322007108 (patch) | |
tree | 63c05a4917af92ae42a3ff3e6005a14e1bbaf6ef /lisp/emacs-lisp | |
parent | 12c5ca4d825496b3c7304b75ab82a6fabdc2023d (diff) | |
download | emacs-02cbb37de73d563149389615ee44741322007108.tar.gz emacs-02cbb37de73d563149389615ee44741322007108.tar.bz2 emacs-02cbb37de73d563149389615ee44741322007108.zip |
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 3a00fdb454d..6530d06b91c 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -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))) |