aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLute Kamstra <[email protected]>2005-04-05 14:46:29 +0000
committerLute Kamstra <[email protected]>2005-04-05 14:46:29 +0000
commitab7bc2908ba54e4172c02ac04ed2bdfa008fadcf (patch)
treeb7c2673333d3947cee1d7b9f4c5a924818e21b5c
parenta22315a8bb25fdc14649b14f7392613f388b1e23 (diff)
(define-global-minor-mode): Don't use custom-current-group.
(define-minor-mode): Ditto. Document default :group value.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/emacs-lisp/easy-mmode.el21
2 files changed, 18 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 09f64afbe3..a9b80250a9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2005-04-05 Lute Kamstra <[email protected]>
+
+ * generic.el (define-generic-mode): Don't use custom-current-group.
+ Document default :group value.
+ * emacs-lisp/easy-mmode.el (define-minor-mode): Ditto.
+ (define-global-minor-mode): Don't use custom-current-group.
+
2005-04-05 Glenn Morris <[email protected]>
* 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 a96b174113..01935c9d5e 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.
These following keyword arguments are supported (other keywords
will be passed to `defcustom' if the minor mode is global):
:group GROUP Custom group name to use in all generated `defcustom' forms.
+ Defaults to MODE without the possible trailing \"-mode\".
+ (This default may not be a valid customization group defined
+ with `defgroup'. Make sure it is.)
:global GLOBAL If non-nil specifies that the minor mode is not meant to be
- buffer-local, so don't make the variable MODE buffer-local.
+ buffer-local, so don't make the variable MODE buffer-local.
By default, the mode is buffer-local.
:init-value VAL Same as the INIT-VALUE argument.
:lighter SPEC Same as the LIGHTER argument.
@@ -153,10 +156,9 @@ 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
- "-mode\\'" "" mode-name))))))
-
+ `(:group ',(intern (replace-regexp-in-string
+ "-mode\\'" "" mode-name)))))
+
`(progn
;; Define the variable to enable or disable the mode.
,(if (not globalp)
@@ -220,8 +222,8 @@ With zero or negative ARG turn mode off.
;; Return the new setting.
,mode)
- ;; Autoloading an easy-mmode-define-minor-mode autoloads
- ;; everything up-to-here.
+ ;; Autoloading a define-minor-mode autoloads everything
+ ;; up-to-here.
:autoload-end
;; The toggle's hook.
@@ -280,9 +282,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
- "-mode\\'" "" (symbol-name mode)))))))
+ `(:group ',(intern (replace-regexp-in-string
+ "-mode\\'" "" (symbol-name mode))))))
`(progn
;; The actual global minor-mode