Mercurial > emacs
comparison lisp/cus-edit.el @ 67298:7af5860f4444
(customize-group, customize-group-other-window):
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').
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Sun, 04 Dec 2005 02:39:24 +0000 |
parents | 7ae3d744378e |
children | 3fe860e6e6eb |
comparison
equal
deleted
inserted
replaced
67297:7060bfa31573 | 67298:7af5860f4444 |
---|---|
973 | 973 |
974 | 974 |
975 ;;;###autoload | 975 ;;;###autoload |
976 (defun customize-group (group) | 976 (defun customize-group (group) |
977 "Customize GROUP, which must be a customization group." | 977 "Customize GROUP, which must be a customization group." |
978 (interactive (list (let ((completion-ignore-case t)) | 978 (interactive |
979 (completing-read "Customize group (default emacs): " | 979 (list (let ((completion-ignore-case t)) |
980 obarray | 980 (completing-read "Customize group (default emacs): " |
981 (lambda (symbol) | 981 obarray |
982 (or (get symbol 'custom-loads) | 982 (lambda (symbol) |
983 (get symbol 'custom-group))) | 983 (or (and (get symbol 'custom-loads) |
984 t)))) | 984 (not (get symbol 'custom-autoload))) |
985 (get symbol 'custom-group))) | |
986 t)))) | |
985 (when (stringp group) | 987 (when (stringp group) |
986 (if (string-equal "" group) | 988 (if (string-equal "" group) |
987 (setq group 'emacs) | 989 (setq group 'emacs) |
988 (setq group (intern group)))) | 990 (setq group (intern group)))) |
989 (let ((name (format "*Customize Group: %s*" | 991 (let ((name (format "*Customize Group: %s*" |
996 (custom-unlispify-tag-name group)))))) | 998 (custom-unlispify-tag-name group)))))) |
997 | 999 |
998 ;;;###autoload | 1000 ;;;###autoload |
999 (defun customize-group-other-window (group) | 1001 (defun customize-group-other-window (group) |
1000 "Customize GROUP, which must be a customization group." | 1002 "Customize GROUP, which must be a customization group." |
1001 (interactive (list (let ((completion-ignore-case t)) | 1003 (interactive |
1002 (completing-read "Customize group (default emacs): " | 1004 (list (let ((completion-ignore-case t)) |
1003 obarray | 1005 (completing-read "Customize group (default emacs): " |
1004 (lambda (symbol) | 1006 obarray |
1005 (or (get symbol 'custom-loads) | 1007 (lambda (symbol) |
1006 (get symbol 'custom-group))) | 1008 (or (and (get symbol 'custom-loads) |
1007 t)))) | 1009 (not (get symbol 'custom-autoload))) |
1010 (get symbol 'custom-group))) | |
1011 t)))) | |
1008 (when (stringp group) | 1012 (when (stringp group) |
1009 (if (string-equal "" group) | 1013 (if (string-equal "" group) |
1010 (setq group 'emacs) | 1014 (setq group 'emacs) |
1011 (setq group (intern group)))) | 1015 (setq group (intern group)))) |
1012 (let ((name (format "*Customize Group: %s*" | 1016 (let ((name (format "*Customize Group: %s*" |