emacs-lisp/easy-mmode.el: Process macro arguments correctly

* emacs-lisp/easy-mmode.el (define-minor-mode): Process macro
arguments correctly. (Bug#19685)
This commit is contained in:
Kelly Dean 2015-02-16 04:21:06 +00:00 committed by Artur Malabarba
parent 1f2c4f817e
commit 3194809d24
2 changed files with 7 additions and 1 deletions

View file

@ -159,7 +159,8 @@ For example, you could write
;; Allow skipping the first three args.
(cond
((keywordp init-value)
(setq body `(,init-value ,lighter ,keymap ,@body)
(setq body (if keymap `(,init-value ,lighter ,keymap ,@body)
`(,init-value ,lighter))
init-value nil lighter nil keymap nil))
((keywordp lighter)
(setq body `(,lighter ,keymap ,@body) lighter nil keymap nil))