From: Lars Ingebrigtsen Date: Fri, 30 Jul 2021 16:25:12 +0000 (+0200) Subject: Allow nil initializers in define-minor-mode X-Git-Tag: emacs-28.0.90~1630 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=02cbb37de73d563149389615ee44741322007108;p=emacs.git 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. --- 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)))