diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2011-09-22 12:15:52 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-09-22 12:15:52 -0400 |
commit | 72258fe58401a16ab2ff671601c6d6068eb8b799 (patch) | |
tree | ebeff5690f1240a024e02ad42c7bb6fea1001570 /lisp/cus-edit.el | |
parent | 8f0985161467a7018ba08ccf7c9f37cc7fc3edfe (diff) | |
download | emacs-72258fe58401a16ab2ff671601c6d6068eb8b799.tar.gz |
Reintroduce pop-to-buffer-same-window; use it for previous users of same-window-*.
* window.el (pop-to-buffer-same-window): New (reinstated) fun.
* cmuscheme.el (run-scheme, switch-to-scheme):
* cus-edit.el (customize-group, custom-buffer-create)
(customize-browse):
* info.el (info):
* shell.el (shell):
* mail/sendmail.el (mail):
* progmodes/inf-lisp.el (inferior-lisp): Use it.
Fixes: debbugs:9532
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r-- | lisp/cus-edit.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 620ecdba40c..9ba8b27c693 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1111,15 +1111,19 @@ If OTHER-WINDOW is non-nil, display in another window." (setq group (intern group)))) (let ((name (format "*Customize Group: %s*" (custom-unlispify-tag-name group)))) - (if (get-buffer name) - (switch-to-buffer name other-window) + (cond + ((null (get-buffer name)) (funcall (if other-window 'custom-buffer-create-other-window 'custom-buffer-create) (list (list group 'custom-group)) name (concat " for group " - (custom-unlispify-tag-name group)))))) + (custom-unlispify-tag-name group)))) + (other-window + (switch-to-buffer-other-window name)) + (t + (pop-to-buffer-same-window name))))) ;;;###autoload (defun customize-group-other-window (&optional group) @@ -1533,7 +1537,7 @@ Optional NAME is the name of the buffer. OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where SYMBOL is a customization option, and WIDGET is a widget for editing that option." - (switch-to-buffer (custom-get-fresh-buffer (or name "*Customization*"))) + (pop-to-buffer-same-window (custom-get-fresh-buffer (or name "*Customization*"))) (custom-buffer-create-internal options description)) ;;;###autoload @@ -1721,7 +1725,7 @@ Otherwise use brackets." (unless group (setq group 'emacs)) (let ((name "*Customize Browser*")) - (switch-to-buffer (custom-get-fresh-buffer name))) + (pop-to-buffer-same-window (custom-get-fresh-buffer name))) (Custom-mode) (widget-insert (format "\ %s buttons; type RET or click mouse-1 |