From: Gerd Moellmann Date: Thu, 26 Apr 2001 12:37:43 +0000 (+0000) Subject: (save_excursion_restore): Don't use XBUFFER on X-Git-Tag: emacs-pretest-21.0.103~98 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ba973f7a65e914038247e69c6149d75042215b71;p=emacs.git (save_excursion_restore): Don't use XBUFFER on a non-buffer. --- diff --git a/src/ChangeLog b/src/ChangeLog index f4f778bc9aa..9fc2ae2c3f7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-04-26 Gerd Moellmann + + * editfns.c (save_excursion_restore): Don't use XBUFFER on + a non-buffer. + 2001-04-25 Gerd Moellmann * term.c (toggle_highlight): New function. diff --git a/src/editfns.c b/src/editfns.c index 2c443ca5d24..e50ef45ec0a 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;