summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/easy-mmode.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-04-09 02:16:29 +0000
committerMiles Bader <miles@gnu.org>2005-04-09 02:16:29 +0000
commit768d4533ce51d61ce065b28f63aae43c7be0d1cc (patch)
treefb2d103d5c9354b3a15550b160bba0ff2e22c418 /lisp/emacs-lisp/easy-mmode.el
parent918bcc18650840562677f841aa0bcaa34a069be5 (diff)
parent2a9e192d3815d2c34fdd41d52590027805bc9055 (diff)
downloademacs-768d4533ce51d61ce065b28f63aae43c7be0d1cc.tar.gz
emacs-768d4533ce51d61ce065b28f63aae43c7be0d1cc.tar.bz2
emacs-768d4533ce51d61ce065b28f63aae43c7be0d1cc.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-35
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 228-240) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 53-58) - Merge from emacs--cvs-trunk--0 - Update from CVS - Collapse feature addition/removal within single ChangeLog entry
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r--lisp/emacs-lisp/easy-mmode.el21
1 files changed, 11 insertions, 10 deletions
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.
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