summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2007-12-23 16:07:34 +0000
committerAndreas Schwab <schwab@suse.de>2007-12-23 16:07:34 +0000
commitc6de108834cadc30b04fca9ecd0caf0afb141092 (patch)
tree221838d43165e59bf892e75e34bad5a264fa8623 /lisp/files.el
parent48638b4df3d21dbdb44d072900944ebd8ad7bb5e (diff)
downloademacs-c6de108834cadc30b04fca9ecd0caf0afb141092.tar.gz
(switch-to-buffer-other-frame): Return the buffer
switched to.
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 0aec833445d..e475f4350ba 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1050,14 +1050,16 @@ documentation for additional customization information."
"Switch to buffer BUFFER in another frame.
Optional second arg NORECORD non-nil means
do not put this buffer at the front of the list of recently selected ones.
+This function returns the buffer it switched to.
This uses the function `display-buffer' as a subroutine; see its
documentation for additional customization information."
(interactive "BSwitch to buffer in other frame: ")
(let ((pop-up-frames t)
same-window-buffer-names same-window-regexps)
- (pop-to-buffer buffer t norecord)
- (raise-frame (window-frame (selected-window)))))
+ (prog1
+ (pop-to-buffer buffer t norecord)
+ (raise-frame (window-frame (selected-window))))))
(defun display-buffer-other-frame (buffer)
"Switch to buffer BUFFER in another frame.