]> git.eshelyaron.com Git - emacs.git/commitdiff
* window.el (pop-to-buffer): Remove the conditional that
authorMartin Rudalics <rudalics@gmx.at>
Mon, 7 Jun 2010 18:28:02 +0000 (21:28 +0300)
committerJuri Linkov <juri@jurta.org>
Mon, 7 Jun 2010 18:28:02 +0000 (21:28 +0300)
compares new-window and old-window, so it will reselect
the selected window unconditionally.
http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00078.html

* window.c (Fselect_window): Move `record_buffer' up to the
beginning of this function, so the buffer gets recorded
even if the selected window does not change.
http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00137.html

lisp/ChangeLog
lisp/window.el
src/ChangeLog
src/window.c

index 12de400ce07b57747f56532f7cd81ac2d8263349..04d914422e740bc786d4a3f1a4b43b3b41fafa2a 100644 (file)
@@ -1,3 +1,10 @@
+2010-06-07  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.el (pop-to-buffer): Remove the conditional that
+       compares new-window and old-window, so it will reselect
+       the selected window unconditionally.
+       http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00078.html
+
 2010-06-07  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/smie.el (smie-indent-offset-after)
index eb8bedcc9e8a152d81f0ea7c10dd930284d38dc3..b674b480025f4ccf33412c8a48b3bf62af36f46e 100644 (file)
@@ -1220,19 +1220,16 @@ at the front of the list of recently selected ones."
                (let ((buf (get-buffer-create buffer-or-name)))
                  (set-buffer-major-mode buf)
                  buf))))
-       (old-window (selected-window))
        (old-frame (selected-frame))
        new-window new-frame)
     (set-buffer buffer)
     (setq new-window (display-buffer buffer other-window))
-    (unless (eq new-window old-window)
-      ;; `display-buffer' has chosen another window, select it.
-      (select-window new-window norecord)
-      (setq new-frame (window-frame new-window))
-      (unless (eq new-frame old-frame)
-       ;; `display-buffer' has chosen another frame, make sure it gets
-       ;; input focus and is risen.
-       (select-frame-set-input-focus new-frame)))
+    (select-window new-window norecord)
+    (setq new-frame (window-frame new-window))
+    (unless (eq new-frame old-frame)
+      ;; `display-buffer' has chosen another frame, make sure it gets
+      ;; input focus and is risen.
+      (select-frame-set-input-focus new-frame))
     buffer))
 
 ;; I think this should be the default; I think people will prefer it--rms.
index 8bf8d723e3ec2be9278a0dd7da72d9ad32e0ba46..d8990772d688f63451db0e6d0839b117f08b519e 100644 (file)
@@ -1,3 +1,10 @@
+2010-06-07  Martin Rudalics  <rudalics@gmx.at>
+
+       * window.c (Fselect_window): Move `record_buffer' up to the
+       beginning of this function, so the buffer gets recorded
+       even if the selected window does not change.
+       http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00137.html
+
 2010-06-07  Juanma Barranquero  <lekktu@gmail.com>
 
        * cmds.c (Fforward_char, Fbackward_char): Fix typos in docstrings.
index 882f76d9758365d0568928229c04853a1951aa69..c6ea10ea95bf906329b1e381bc3229b724d53cf9 100644 (file)
@@ -3611,6 +3611,7 @@ selected window before each command.  */)
     {
       ++window_select_count;
       XSETFASTINT (w->use_time, window_select_count);
+      record_buffer (w->buffer);
     }
 
   if (EQ (window, selected_window))
@@ -3646,8 +3647,6 @@ selected window before each command.  */)
 
   selected_window = window;
 
-  if (NILP (norecord))
-    record_buffer (w->buffer);
   Fset_buffer (w->buffer);
 
   XBUFFER (w->buffer)->last_selected_window = window;