Avoid the use of ((lambda ...) ...) in lexical-binding code.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 14 Apr 2012 12:48:27 +0000 (08:48 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 14 Apr 2012 12:48:27 +0000 (08:48 -0400)
* emacs-lisp/easy-mmode.el (define-minor-mode): Use funcall.

Fixes: debbugs:11241

lisp/ChangeLog
lisp/emacs-lisp/easy-mmode.el

index 4b031a5..caa11a8 100644 (file)
@@ -1,3 +1,8 @@
+2012-04-14  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       Avoid the use of ((lambda ...) ...) in lexical-binding code.
+       * emacs-lisp/easy-mmode.el (define-minor-mode):Use funcall (bug#11241).
+
 2012-04-13  Kim F. Storm  <storm@cua.dk>
 
        * emulation/cua-base.el (cua-exchange-point-and-mark): Just call
index 88698a1..0d6716a 100644 (file)
@@ -260,7 +260,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
         ;; repeat-command still does the toggling correctly.
         (interactive (list (or current-prefix-arg 'toggle)))
         (let ((,last-message (current-message)))
-           (,@(if setter (list setter)
+           (,@(if setter `(funcall #',setter)
                 (list (if (symbolp mode) 'setq 'setf) mode))
             (if (eq arg 'toggle)
                 (not ,mode)