From 7fd5f65e89638e74471efd71ce62bed626cbe591 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Fri, 23 Aug 2013 08:52:19 +0200 Subject: [PATCH] In display-buffer-pop-up-frame make BUFFER current (Bug#15133). * window.el (display-buffer-pop-up-frame): Call pop-up-frame-function with BUFFER current so `make-frame' will use it as the new frame's buffer (Bug#15133). --- lisp/ChangeLog | 6 ++++++ lisp/window.el | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0bba2e5fb58..b74f4886f37 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-08-23 Martin Rudalics + + * window.el (display-buffer-pop-up-frame): Call + pop-up-frame-function with BUFFER current so `make-frame' will + use it as the new frame's buffer (Bug#15133). + 2013-08-22 Stefan Monnier * calendar/timeclock.el: Minor cleanups. diff --git a/lisp/window.el b/lisp/window.el index 64cf0a72110..21e40071782 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -5642,7 +5642,10 @@ new frame." (fun pop-up-frame-function) frame window) (when (and fun - (setq frame (funcall fun)) + ;; Make BUFFER current so `make-frame' will use it as the + ;; new frame's buffer (Bug#15133). + (with-current-buffer buffer + (setq frame (funcall fun))) (setq window (frame-selected-window frame))) (prog1 (window--display-buffer buffer window 'frame alist display-buffer-mark-dedicated) -- 2.39.2