aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2010-06-07 21:28:02 +0300
committerJuri Linkov2010-06-07 21:28:02 +0300
commit13b5221f4df08dd203b36cc444aab7e825dd29f8 (patch)
tree2cd4b4012752a3d6950b22a6b23e8b70858fa6bd
parent5220357f5856b5b917e84bb6f745982df05a9684 (diff)
downloademacs-13b5221f4df08dd203b36cc444aab7e825dd29f8.tar.gz
emacs-13b5221f4df08dd203b36cc444aab7e825dd29f8.zip
* 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 * 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
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/window.el15
-rw-r--r--src/ChangeLog7
-rw-r--r--src/window.c3
4 files changed, 21 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 12de400ce07..04d914422e7 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12010-06-07 Martin Rudalics <rudalics@gmx.at>
2
3 * window.el (pop-to-buffer): Remove the conditional that
4 compares new-window and old-window, so it will reselect
5 the selected window unconditionally.
6 http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00078.html
7
12010-06-07 Stefan Monnier <monnier@iro.umontreal.ca> 82010-06-07 Stefan Monnier <monnier@iro.umontreal.ca>
2 9
3 * emacs-lisp/smie.el (smie-indent-offset-after) 10 * emacs-lisp/smie.el (smie-indent-offset-after)
diff --git a/lisp/window.el b/lisp/window.el
index eb8bedcc9e8..b674b480025 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1220,19 +1220,16 @@ at the front of the list of recently selected ones."
1220 (let ((buf (get-buffer-create buffer-or-name))) 1220 (let ((buf (get-buffer-create buffer-or-name)))
1221 (set-buffer-major-mode buf) 1221 (set-buffer-major-mode buf)
1222 buf)))) 1222 buf))))
1223 (old-window (selected-window))
1224 (old-frame (selected-frame)) 1223 (old-frame (selected-frame))
1225 new-window new-frame) 1224 new-window new-frame)
1226 (set-buffer buffer) 1225 (set-buffer buffer)
1227 (setq new-window (display-buffer buffer other-window)) 1226 (setq new-window (display-buffer buffer other-window))
1228 (unless (eq new-window old-window) 1227 (select-window new-window norecord)
1229 ;; `display-buffer' has chosen another window, select it. 1228 (setq new-frame (window-frame new-window))
1230 (select-window new-window norecord) 1229 (unless (eq new-frame old-frame)
1231 (setq new-frame (window-frame new-window)) 1230 ;; `display-buffer' has chosen another frame, make sure it gets
1232 (unless (eq new-frame old-frame) 1231 ;; input focus and is risen.
1233 ;; `display-buffer' has chosen another frame, make sure it gets 1232 (select-frame-set-input-focus new-frame))
1234 ;; input focus and is risen.
1235 (select-frame-set-input-focus new-frame)))
1236 buffer)) 1233 buffer))
1237 1234
1238;; I think this should be the default; I think people will prefer it--rms. 1235;; I think this should be the default; I think people will prefer it--rms.
diff --git a/src/ChangeLog b/src/ChangeLog
index 8bf8d723e3e..d8990772d68 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
12010-06-07 Martin Rudalics <rudalics@gmx.at>
2
3 * window.c (Fselect_window): Move `record_buffer' up to the
4 beginning of this function, so the buffer gets recorded
5 even if the selected window does not change.
6 http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00137.html
7
12010-06-07 Juanma Barranquero <lekktu@gmail.com> 82010-06-07 Juanma Barranquero <lekktu@gmail.com>
2 9
3 * cmds.c (Fforward_char, Fbackward_char): Fix typos in docstrings. 10 * cmds.c (Fforward_char, Fbackward_char): Fix typos in docstrings.
diff --git a/src/window.c b/src/window.c
index 882f76d9758..c6ea10ea95b 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3611,6 +3611,7 @@ selected window before each command. */)
3611 { 3611 {
3612 ++window_select_count; 3612 ++window_select_count;
3613 XSETFASTINT (w->use_time, window_select_count); 3613 XSETFASTINT (w->use_time, window_select_count);
3614 record_buffer (w->buffer);
3614 } 3615 }
3615 3616
3616 if (EQ (window, selected_window)) 3617 if (EQ (window, selected_window))
@@ -3646,8 +3647,6 @@ selected window before each command. */)
3646 3647
3647 selected_window = window; 3648 selected_window = window;
3648 3649
3649 if (NILP (norecord))
3650 record_buffer (w->buffer);
3651 Fset_buffer (w->buffer); 3650 Fset_buffer (w->buffer);
3652 3651
3653 XBUFFER (w->buffer)->last_selected_window = window; 3652 XBUFFER (w->buffer)->last_selected_window = window;