changeset 98176:9f150a0f6e59

(Fselect_window): Don't update window_select_count and use_time when norecord is not nil.
author Martin Rudalics <rudalics@gmx.at>
date Mon, 15 Sep 2008 08:21:06 +0000
parents dc54ec9cb542
children d989cacb2b4e
files src/window.c
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/window.c	Sun Sep 14 21:18:56 2008 +0000
+++ b/src/window.c	Mon Sep 15 08:21:06 2008 +0000
@@ -3496,11 +3496,11 @@
        doc: /* Select WINDOW.  Most editing will apply to WINDOW's buffer.
 If WINDOW is not already selected, make WINDOW's buffer current
 and make WINDOW the frame's selected window.  Return WINDOW.
-Optional second arg NORECORD non-nil means
-do not put this buffer at the front of the list of recently selected ones.
-
-Note that the main editor command loop
-selects the buffer of the selected window before each command.  */)
+Optional second arg NORECORD non-nil means do not put this buffer
+at the front of the list of recently selected ones.
+
+Note that the main editor command loop selects the buffer of the
+selected window before each command.  */)
      (window, norecord)
      register Lisp_Object window, norecord;
 {
@@ -3513,8 +3513,12 @@
   w = XWINDOW (window);
   w->frozen_window_start_p = 0;
 
-  ++window_select_count;
-  XSETFASTINT (w->use_time, window_select_count);
+  if (NILP (norecord))
+    {
+      ++window_select_count;
+      XSETFASTINT (w->use_time, window_select_count);
+    }
+
   if (EQ (window, selected_window))
     return window;