]> git.eshelyaron.com Git - emacs.git/commitdiff
(save_excursion_restore): Don't use XBUFFER on
authorGerd Moellmann <gerd@gnu.org>
Thu, 26 Apr 2001 12:37:43 +0000 (12:37 +0000)
committerGerd Moellmann <gerd@gnu.org>
Thu, 26 Apr 2001 12:37:43 +0000 (12:37 +0000)
a non-buffer.

src/ChangeLog
src/editfns.c

index f4f778bc9aa08035379325cac1e16c76926491a8..9fc2ae2c3f7e6c970eb41260641bd08d03bf919d 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-26  Gerd Moellmann  <gerd@gnu.org>
+
+       * editfns.c (save_excursion_restore): Don't use XBUFFER on
+       a non-buffer.
+
 2001-04-25  Gerd Moellmann  <gerd@gnu.org>
 
        * term.c (toggle_highlight): New function.
index 2c443ca5d240df63acbad0ec7b2fa1e56f501e95..e50ef45ec0af537f1b48508d1b9ebec1cffd2b5b 100644 (file)
@@ -848,8 +848,11 @@ save_excursion_restore (info)
   tem = XCDR (info);
   if (visible_p
       && !EQ (tem, selected_window)
-      /* This also verifies that the window is still live.  */
-      && XBUFFER (XWINDOW (tem)->buffer) == current_buffer)
+      && (tem1 = XWINDOW (tem)->buffer,
+         (/* Window is live...  */
+          BUFFERP (tem1)
+          /* ...and it shows the current buffer.  */
+          && XBUFFER (tem1) == current_buffer)))
     Fset_window_point (tem, make_number (PT));
 
   UNGCPRO;