diff options
| author | Richard M. Stallman | 1998-05-09 04:59:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-05-09 04:59:22 +0000 |
| commit | fd88fe732dd5335b371e8005b2e5e36db273112a (patch) | |
| tree | 3d32e50ab84fc87ffca4a2a433f7312c4f380dcc | |
| parent | 9129bcc3bdf34399e6d30f1c02bc7414246dc5fe (diff) | |
| download | emacs-fd88fe732dd5335b371e8005b2e5e36db273112a.tar.gz emacs-fd88fe732dd5335b371e8005b2e5e36db273112a.zip | |
(customize-group-other-window): Handle groups not
yet loaded. If buffer exists, use it unchanged. Rename parameter
and update doc string.
| -rw-r--r-- | lisp/cus-edit.el | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index b9d34f3944e..444ab4524b6 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -828,21 +828,32 @@ are shown; the contents of those subgroups are initially hidden." | |||
| 828 | (custom-unlispify-tag-name group)))))) | 828 | (custom-unlispify-tag-name group)))))) |
| 829 | 829 | ||
| 830 | ;;;###autoload | 830 | ;;;###autoload |
| 831 | (defun customize-group-other-window (symbol) | 831 | (defun customize-group-other-window (group) |
| 832 | "Customize SYMBOL, which must be a customization group." | 832 | "Customize GROUP, which must be a customization group." |
| 833 | (interactive (list (completing-read "Customize group: (default emacs) " | 833 | (interactive (list (let ((completion-ignore-case t)) |
| 834 | obarray | 834 | (completing-read "Customize group: (default emacs) " |
| 835 | (lambda (symbol) | 835 | obarray |
| 836 | (get symbol 'custom-group)) | 836 | (lambda (symbol) |
| 837 | t))) | 837 | (or (get symbol 'custom-loads) |
| 838 | 838 | (get symbol 'custom-group))) | |
| 839 | (when (stringp symbol) | 839 | t)))) |
| 840 | (if (string-equal "" symbol) | 840 | (when (stringp group) |
| 841 | (setq symbol 'emacs) | 841 | (if (string-equal "" group) |
| 842 | (setq symbol (intern symbol)))) | 842 | (setq group 'emacs) |
| 843 | (custom-buffer-create-other-window | 843 | (setq group (intern group)))) |
| 844 | (list (list symbol 'custom-group)) | 844 | (or (get group 'custom-group) |
| 845 | (format "*Customize Group: %s*" (custom-unlispify-tag-name symbol)))) | 845 | (custom-load-symbol group)) |
| 846 | (let ((name (format "*Customize Group: %s*" | ||
| 847 | (custom-unlispify-tag-name group)))) | ||
| 848 | (if (get-buffer name) | ||
| 849 | (let ((window (selected-window))) | ||
| 850 | (switch-to-buffer-other-window name) | ||
| 851 | (select-window window)) | ||
| 852 | (custom-buffer-create-other-window | ||
| 853 | (list (list group 'custom-group)) | ||
| 854 | name | ||
| 855 | (concat " for group " | ||
| 856 | (custom-unlispify-tag-name group)))))) | ||
| 846 | 857 | ||
| 847 | ;;;###autoload | 858 | ;;;###autoload |
| 848 | (defalias 'customize-variable 'customize-option) | 859 | (defalias 'customize-variable 'customize-option) |