# HG changeset patch # User Andreas Schwab # Date 1198426054 0 # Node ID b396341ab882efbc3435458bd6fd80c3ab089463 # Parent f8bd0c4cb446a68ea48e071951679ed1762485c9 (switch-to-buffer-other-frame): Return the buffer switched to. diff -r f8bd0c4cb446 -r b396341ab882 lisp/files.el --- a/lisp/files.el Sun Dec 23 13:29:13 2007 +0000 +++ b/lisp/files.el Sun Dec 23 16:07:34 2007 +0000 @@ -1050,14 +1050,16 @@ "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.