]> git.eshelyaron.com Git - emacs.git/commitdiff
In display-buffer-pop-up-frame make BUFFER current (Bug#15133).
authorMartin Rudalics <rudalics@gmx.at>
Fri, 23 Aug 2013 06:52:19 +0000 (08:52 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Fri, 23 Aug 2013 06:52:19 +0000 (08:52 +0200)
* 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
lisp/window.el

index 0bba2e5fb5863462b446fb063fe043513e13347e..b74f4886f374b9669341992bf5b5dc2640fb0f20 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-23  Martin Rudalics  <rudalics@gmx.at>
+
+       * 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  <monnier@iro.umontreal.ca>
 
        * calendar/timeclock.el: Minor cleanups.
index 64cf0a72110cbedcff914637b7b0cbb6c9f83c6f..21e40071782995aca7d8a95d4652a633b2330873 100644 (file)
@@ -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)