summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/easy-mmode.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-01-31 21:17:17 -0500
committerGlenn Morris <rgm@gnu.org>2012-01-31 21:17:17 -0500
commit781acb9f3a3a02af4d9abd30af8f2ec379453f9d (patch)
tree23dcfefab97f4763d34a96aa944358623ae8b48a /lisp/emacs-lisp/easy-mmode.el
parent9e7056a545b339f0bc4931728d903f20aaff9885 (diff)
downloademacs-781acb9f3a3a02af4d9abd30af8f2ec379453f9d.tar.gz
Tweak previous define-minor-mode change
* lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Relax :variable's test for a named function.
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el12
1 files changed, 3 insertions, 9 deletions
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
(:require (setq require (pop body)))
(:keymap (setq keymap (pop body)))
(:variable (setq variable (pop body))
- (setq tmp (cdr-safe variable))
- (if (not (or (functionp tmp)
- (and tmp
- (symbolp tmp)
- ;; Hack to allow for named functions not within
- ;; eval-when-compile.
- ;; Cf define-compilation-mode.
- (boundp 'byte-compile-function-environment)
- (assq tmp byte-compile-function-environment))))
+ (if (not (and (setq tmp (cdr-safe variable))
+ (or (symbolp tmp)
+ (functionp tmp))))
;; PLACE is not of the form (GET . SET).
(setq mode variable)
(setq mode (car variable))