(let* ((mode-name (symbol-name mode))
(pretty-name (easy-mmode-pretty-mode-name mode lighter))
(globalp nil)
+ (initialize nil)
(group nil)
(extra-args nil)
(extra-keywords nil)
(:lighter (setq lighter (pop body)))
(:global (setq globalp (pop body)))
(:extra-args (setq extra-args (pop body)))
+ (:initialize (setq initialize (list :initialize (pop body))))
(:group (setq group (nconc group (list :group (pop body)))))
(:require (setq require (pop body)))
(:keymap (setq keymap (pop body)))
(setq keymap-sym (if (and keymap (symbolp keymap)) keymap
(intern (concat mode-name "-map"))))
+ (unless initialize
+ (setq initialize
+ '(:initialize 'custom-initialize-default)))
+
(unless group
;; We might as well provide a best-guess default group.
(setq group
`(defcustom ,mode ,init-value
,(format base-doc-string pretty-name mode mode)
:set 'custom-set-minor-mode
- :initialize 'custom-initialize-default
+ ,@initialize
,@group
:type 'boolean
,@(cond