aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-01-31 21:17:17 -0500
committerGlenn Morris2012-01-31 21:17:17 -0500
commit781acb9f3a3a02af4d9abd30af8f2ec379453f9d (patch)
tree23dcfefab97f4763d34a96aa944358623ae8b48a
parent9e7056a545b339f0bc4931728d903f20aaff9885 (diff)
downloademacs-781acb9f3a3a02af4d9abd30af8f2ec379453f9d.tar.gz
emacs-781acb9f3a3a02af4d9abd30af8f2ec379453f9d.zip
Tweak previous define-minor-mode change
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Relax :variable's test for a named function.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/easy-mmode.el12
2 files changed, 8 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 71f96cccfeb..77dc97db5c7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-02-01 Glenn Morris <rgm@gnu.org>
2
3 * emacs-lisp/easy-mmode.el (define-minor-mode):
4 Relax :variable's test for a named function.
5
12012-01-31 Alan Mackenzie <acm@muc.de> 62012-01-31 Alan Mackenzie <acm@muc.de>
2 7
3 * progmodes/cc-engine.el (c-guess-basic-syntax): CASE 5B.1: Fix an 8 * progmodes/cc-engine.el (c-guess-basic-syntax): CASE 5B.1: Fix an
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index efd5ee45d9b..d871f6f1212 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -182,15 +182,9 @@ For example, you could write
182 (:require (setq require (pop body))) 182 (:require (setq require (pop body)))
183 (:keymap (setq keymap (pop body))) 183 (:keymap (setq keymap (pop body)))
184 (:variable (setq variable (pop body)) 184 (:variable (setq variable (pop body))
185 (setq tmp (cdr-safe variable)) 185 (if (not (and (setq tmp (cdr-safe variable))
186 (if (not (or (functionp tmp) 186 (or (symbolp tmp)
187 (and tmp 187 (functionp tmp))))
188 (symbolp tmp)
189 ;; Hack to allow for named functions not within
190 ;; eval-when-compile.
191 ;; Cf define-compilation-mode.
192 (boundp 'byte-compile-function-environment)
193 (assq tmp byte-compile-function-environment))))
194 ;; PLACE is not of the form (GET . SET). 188 ;; PLACE is not of the form (GET . SET).
195 (setq mode variable) 189 (setq mode variable)
196 (setq mode (car variable)) 190 (setq mode (car variable))