summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2007-12-23 16:08:54 +0000
committerAndreas Schwab <schwab@suse.de>2007-12-23 16:08:54 +0000
commitf862fc9e051dfd9850b8b45fe9e41dd5f781ec5f (patch)
treec0e1e0d4a40f2af22ba26c7a800eed4092109fee
parent90e12e78d6dc78da17e2a15ed763a9f1cad6f333 (diff)
downloademacs-f862fc9e051dfd9850b8b45fe9e41dd5f781ec5f.tar.gz
(switch-to-buffer-other-frame): Return the buffer
switched to.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el6
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1d9355aa928..e5742f97e50 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2007-12-23 Andreas Schwab <schwab@suse.de>
+
+ * files.el (switch-to-buffer-other-frame): Return the buffer
+ switched to.
+
2007-12-23 Juri Linkov <juri@jurta.org>
* term/mac-win.el (mac-apple-event-map): Bind About Emacs menu
diff --git a/lisp/files.el b/lisp/files.el
index 423bc1eb804..d4b15324f94 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1010,14 +1010,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.