diff options
author | Miles Bader <miles@gnu.org> | 2005-04-02 22:40:25 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2005-04-02 22:40:25 +0000 |
commit | 4a2283bcc7998fef3788136a16a6c2b10df6fe6f (patch) | |
tree | dc8199f604a6e5a2d57754d843773be6c88c4f36 /lisp/emacs-lisp | |
parent | 417294f4d1d8872d7a4a698de1a9650f18af3b37 (diff) | |
parent | ab77efd0e55c661ea8fd45df28f2a39d0c46fbd8 (diff) | |
download | emacs-4a2283bcc7998fef3788136a16a6c2b10df6fe6f.tar.gz emacs-4a2283bcc7998fef3788136a16a6c2b10df6fe6f.tar.bz2 emacs-4a2283bcc7998fef3788136a16a6c2b10df6fe6f.zip |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-33
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 223-227)
- Update from CVS
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 2 | ||||
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 16 |
2 files changed, 10 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 0a75a43827e..68d1287d98c 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -72,7 +72,7 @@ or macro definition or a defcustom)." (let ((car (car-safe form)) expand) (cond ;; For complex cases, try again on the macro-expansion. - ((and (memq car '(easy-mmode-define-global-mode + ((and (memq car '(easy-mmode-define-global-mode define-global-minor-mode easy-mmode-define-minor-mode define-minor-mode)) (setq expand (let ((load-file-name file)) (macroexpand form))) (eq (car expand) 'progn) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index b6b91710ed4..a96b1741139 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -1,6 +1,7 @@ ;;; easy-mmode.el --- easy definition for major and minor modes -;; Copyright (C) 1997,2000,01,02,03,2004 Free Software Foundation, Inc. +;; Copyright (C) 1997, 2000, 2001, 2002, 2003, 2004, 2005 +;; Free Software Foundation, Inc. ;; Author: Georges Brun-Cottan <Georges.Brun-Cottan@inria.fr> ;; Maintainer: Stefan Monnier <monnier@gnu.org> @@ -152,8 +153,8 @@ For example, you could write (unless group ;; We might as well provide a best-guess default group. (setq group - `(:group ',(or (custom-current-group) - (intern (replace-regexp-in-string + `(:group (or (custom-current-group) + ',(intern (replace-regexp-in-string "-mode\\'" "" mode-name)))))) `(progn @@ -253,8 +254,9 @@ With zero or negative ARG turn mode off. ;;; ;;;###autoload -(defmacro easy-mmode-define-global-mode (global-mode mode turn-on - &rest keys) +(defalias 'easy-mmode-define-global-mode 'define-global-minor-mode) +;;;###autoload +(defmacro define-global-minor-mode (global-mode mode turn-on &rest keys) "Make GLOBAL-MODE out of the buffer-local minor MODE. TURN-ON is a function that will be called with no args in every buffer and that should try to turn MODE on if applicable for that buffer. @@ -278,8 +280,8 @@ KEYS is a list of CL-style keyword arguments: (unless group ;; We might as well provide a best-guess default group. (setq group - `(:group ',(or (custom-current-group) - (intern (replace-regexp-in-string + `(:group (or (custom-current-group) + ',(intern (replace-regexp-in-string "-mode\\'" "" (symbol-name mode))))))) `(progn |