diff lisp/emacs-lisp/easy-mmode.el @ 61318:8c8c06fad8d3

(define-global-minor-mode): Don't use custom-current-group. (define-minor-mode): Ditto. Document default :group value.
author Lute Kamstra <lute@gnu.org>
date Tue, 05 Apr 2005 14:45:41 +0000
parents ef26a481327e
children d60a6aee7c8d 02f1dbc4a199
line wrap: on
line diff
--- a/lisp/emacs-lisp/easy-mmode.el	Tue Apr 05 14:44:34 2005 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el	Tue Apr 05 14:45:41 2005 +0000
@@ -94,8 +94,11 @@
   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 @@
     (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 @@
 	 ;; 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 @@
     (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