Skip to content

Commit

Permalink
Allow nil initializers in define-minor-mode
Browse files Browse the repository at this point in the history
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Make the
meaning of :initialize nil and a missing :initialize the same.
  • Loading branch information
larsmagne committed Jul 31, 2021
1 parent 12c5ca4 commit 02cbb37
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lisp/emacs-lisp/easy-mmode.el
Expand Up @@ -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)))
Expand Down

0 comments on commit 02cbb37

Please sign in to comment.