aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann <[email protected]>2001-04-26 12:37:43 +0000
committerGerd Moellmann <[email protected]>2001-04-26 12:37:43 +0000
commitba973f7a65e914038247e69c6149d75042215b71 (patch)
treed99973642b05b1ec9cb71a5cac3c2cba6452a45e /src
parentb792ae3605a3824b49f3b7a83300fd3f6b7b1f59 (diff)
(save_excursion_restore): Don't use XBUFFER on
a non-buffer.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/editfns.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f4f778bc9a..9fc2ae2c3f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-26 Gerd Moellmann <[email protected]>
+
+ * editfns.c (save_excursion_restore): Don't use XBUFFER on
+ a non-buffer.
+
2001-04-25 Gerd Moellmann <[email protected]>
* term.c (toggle_highlight): New function.
diff --git a/src/editfns.c b/src/editfns.c
index 2c443ca5d2..e50ef45ec0 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -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;