From: Glenn Morris Date: Wed, 1 Feb 2012 02:17:17 +0000 (-0500) Subject: Tweak previous define-minor-mode change X-Git-Tag: emacs-pretest-24.0.94~362^2~14 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=781acb9f3a3a02af4d9abd30af8f2ec379453f9d;p=emacs.git Tweak previous define-minor-mode change * lisp/emacs-lisp/easy-mmode.el (define-minor-mode): Relax :variable's test for a named function. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 71f96cccfeb..77dc97db5c7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-02-01 Glenn Morris + + * emacs-lisp/easy-mmode.el (define-minor-mode): + Relax :variable's test for a named function. + 2012-01-31 Alan Mackenzie * 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 (: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))