]> git.eshelyaron.com Git - emacs.git/commitdiff
(customize-group, customize-group-other-window):
authorJuri Linkov <juri@jurta.org>
Sun, 4 Dec 2005 02:39:24 +0000 (02:39 +0000)
committerJuri Linkov <juri@jurta.org>
Sun, 4 Dec 2005 02:39:24 +0000 (02:39 +0000)
Filter out autoloaded options from the group completion list by
using heuristics that autoloaded groups don't have `custom-autoload'
property on their symbols (they have only `custom-loads').

lisp/cus-edit.el

index b84568b70604d04068a879a45753547521554aad..d4ea953bc09a1e8076038be572413ffff79e86bc 100644 (file)
@@ -975,13 +975,15 @@ then prompt for the MODE to customize."
 ;;;###autoload
 (defun customize-group (group)
   "Customize GROUP, which must be a customization group."
-  (interactive (list (let ((completion-ignore-case t))
-                      (completing-read "Customize group (default emacs): "
-                                       obarray
-                                       (lambda (symbol)
-                                         (or (get symbol 'custom-loads)
-                                             (get symbol 'custom-group)))
-                                       t))))
+  (interactive
+   (list (let ((completion-ignore-case t))
+          (completing-read "Customize group (default emacs): "
+                           obarray
+                           (lambda (symbol)
+                             (or (and (get symbol 'custom-loads)
+                                      (not (get symbol 'custom-autoload)))
+                                 (get symbol 'custom-group)))
+                           t))))
   (when (stringp group)
     (if (string-equal "" group)
        (setq group 'emacs)
@@ -998,13 +1000,15 @@ then prompt for the MODE to customize."
 ;;;###autoload
 (defun customize-group-other-window (group)
   "Customize GROUP, which must be a customization group."
-  (interactive (list (let ((completion-ignore-case t))
-                      (completing-read "Customize group (default emacs): "
-                                       obarray
-                                       (lambda (symbol)
-                                         (or (get symbol 'custom-loads)
-                                             (get symbol 'custom-group)))
-                                       t))))
+  (interactive
+   (list (let ((completion-ignore-case t))
+          (completing-read "Customize group (default emacs): "
+                           obarray
+                           (lambda (symbol)
+                             (or (and (get symbol 'custom-loads)
+                                      (not (get symbol 'custom-autoload)))
+                                 (get symbol 'custom-group)))
+                           t))))
   (when (stringp group)
     (if (string-equal "" group)
        (setq group 'emacs)