diff options
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 21 |
2 files changed, 18 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 09f64afbe38..a9b80250a99 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2005-04-05 Lute Kamstra <lute@gnu.org> | ||
| 2 | |||
| 3 | * generic.el (define-generic-mode): Don't use custom-current-group. | ||
| 4 | Document default :group value. | ||
| 5 | * emacs-lisp/easy-mmode.el (define-minor-mode): Ditto. | ||
| 6 | (define-global-minor-mode): Don't use custom-current-group. | ||
| 7 | |||
| 1 | 2005-04-05 Glenn Morris <gmorris@ast.cam.ac.uk> | 8 | 2005-04-05 Glenn Morris <gmorris@ast.cam.ac.uk> |
| 2 | 9 | ||
| 3 | * progmodes/sh-script.el (sh-builtins) <bash>: Add `caller'. | 10 | * progmodes/sh-script.el (sh-builtins) <bash>: Add `caller'. |
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index a96b1741139..01935c9d5e8 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el | |||
| @@ -94,8 +94,11 @@ BODY contains code that will be executed each time the mode is (dis)activated. | |||
| 94 | These following keyword arguments are supported (other keywords | 94 | These following keyword arguments are supported (other keywords |
| 95 | will be passed to `defcustom' if the minor mode is global): | 95 | will be passed to `defcustom' if the minor mode is global): |
| 96 | :group GROUP Custom group name to use in all generated `defcustom' forms. | 96 | :group GROUP Custom group name to use in all generated `defcustom' forms. |
| 97 | Defaults to MODE without the possible trailing \"-mode\". | ||
| 98 | (This default may not be a valid customization group defined | ||
| 99 | with `defgroup'. Make sure it is.) | ||
| 97 | :global GLOBAL If non-nil specifies that the minor mode is not meant to be | 100 | :global GLOBAL If non-nil specifies that the minor mode is not meant to be |
| 98 | buffer-local, so don't make the variable MODE buffer-local. | 101 | buffer-local, so don't make the variable MODE buffer-local. |
| 99 | By default, the mode is buffer-local. | 102 | By default, the mode is buffer-local. |
| 100 | :init-value VAL Same as the INIT-VALUE argument. | 103 | :init-value VAL Same as the INIT-VALUE argument. |
| 101 | :lighter SPEC Same as the LIGHTER argument. | 104 | :lighter SPEC Same as the LIGHTER argument. |
| @@ -153,10 +156,9 @@ For example, you could write | |||
| 153 | (unless group | 156 | (unless group |
| 154 | ;; We might as well provide a best-guess default group. | 157 | ;; We might as well provide a best-guess default group. |
| 155 | (setq group | 158 | (setq group |
| 156 | `(:group (or (custom-current-group) | 159 | `(:group ',(intern (replace-regexp-in-string |
| 157 | ',(intern (replace-regexp-in-string | 160 | "-mode\\'" "" mode-name))))) |
| 158 | "-mode\\'" "" mode-name)))))) | 161 | |
| 159 | |||
| 160 | `(progn | 162 | `(progn |
| 161 | ;; Define the variable to enable or disable the mode. | 163 | ;; Define the variable to enable or disable the mode. |
| 162 | ,(if (not globalp) | 164 | ,(if (not globalp) |
| @@ -220,8 +222,8 @@ With zero or negative ARG turn mode off. | |||
| 220 | ;; Return the new setting. | 222 | ;; Return the new setting. |
| 221 | ,mode) | 223 | ,mode) |
| 222 | 224 | ||
| 223 | ;; Autoloading an easy-mmode-define-minor-mode autoloads | 225 | ;; Autoloading a define-minor-mode autoloads everything |
| 224 | ;; everything up-to-here. | 226 | ;; up-to-here. |
| 225 | :autoload-end | 227 | :autoload-end |
| 226 | 228 | ||
| 227 | ;; The toggle's hook. | 229 | ;; The toggle's hook. |
| @@ -280,9 +282,8 @@ KEYS is a list of CL-style keyword arguments: | |||
| 280 | (unless group | 282 | (unless group |
| 281 | ;; We might as well provide a best-guess default group. | 283 | ;; We might as well provide a best-guess default group. |
| 282 | (setq group | 284 | (setq group |
| 283 | `(:group (or (custom-current-group) | 285 | `(:group ',(intern (replace-regexp-in-string |
| 284 | ',(intern (replace-regexp-in-string | 286 | "-mode\\'" "" (symbol-name mode)))))) |
| 285 | "-mode\\'" "" (symbol-name mode))))))) | ||
| 286 | 287 | ||
| 287 | `(progn | 288 | `(progn |
| 288 | ;; The actual global minor-mode | 289 | ;; The actual global minor-mode |