changeset 61317:0aa94186ae69

(define-generic-mode): Don't use custom-current-group. Document default :group value.
author Lute Kamstra <lute@gnu.org>
date Tue, 05 Apr 2005 14:44:34 +0000
parents 283f977b41fb
children 8c8c06fad8d3
files lisp/generic.el
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/generic.el	Tue Apr 05 13:07:42 2005 +0000
+++ b/lisp/generic.el	Tue Apr 05 14:44:34 2005 +0000
@@ -219,8 +219,10 @@
 
 The optional CUSTOM-KEYWORD-ARGS are pairs of keywords and
 values.  They will be passed to the generated `defcustom' form of
-the mode hook variable MODE-hook.  You can specify keyword
-arguments without specifying a docstring.
+the mode hook variable MODE-hook.  Defaults to MODE without the
+possible trailing \"-mode\".  (This default may not be a valid
+customization group defined with `defgroup'.  Make sure it is.)
+You can specify keyword arguments without specifying a docstring.
 
 See the file generic-x.el for some examples of `define-generic-mode'."
   (declare (debug (sexp def-form def-form def-form form def-form
@@ -245,9 +247,8 @@
     (unless (plist-get custom-keyword-args :group)
       (setq custom-keyword-args
 	    (plist-put custom-keyword-args 
-		       :group `(or (custom-current-group)
-				   ',(intern (replace-regexp-in-string
-					      "-mode\\'" "" mode-name))))))
+		       :group `',(intern (replace-regexp-in-string
+					  "-mode\\'" "" mode-name)))))
 
     `(progn
        ;; Add a new entry.