changeset 21748:c423e8929f69

(Qinhibit_point_motion_hooks): New variable. (syms_of_xdisp): Init and staticpro it. (redisplay_window): Bind the symbol to t.
author Richard M. Stallman <rms@gnu.org>
date Fri, 24 Apr 1998 06:28:46 +0000
parents c11ef8945466
children 84df514f7719
files src/xdisp.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Fri Apr 24 04:35:05 1998 +0000
+++ b/src/xdisp.c	Fri Apr 24 06:28:46 1998 +0000
@@ -64,6 +64,7 @@
 Lisp_Object Qoverriding_local_map, Qoverriding_terminal_local_map;
 Lisp_Object Qwindow_scroll_functions, Vwindow_scroll_functions;
 Lisp_Object Qredisplay_end_trigger_functions;
+Lisp_Object Qinhibit_point_motion_hooks;
 
 /* Nonzero means print newline to stdout before next minibuffer message.  */
 
@@ -1745,6 +1746,7 @@
   int update_mode_line;
   struct Lisp_Char_Table *dp = window_display_table (w);
   int really_switched_buffer = 0;
+  int count = specpdl_ptr - specpdl;
 
   if (Z == Z_BYTE && lpoint != lpoint_byte)
     abort ();
@@ -1767,7 +1769,9 @@
     }
   if (NILP (w->buffer))
     abort ();
-  
+
+  specbind (Qinhibit_point_motion_hooks, Qt);
+
   height = window_internal_height (w);
   update_mode_line = (!NILP (w->update_mode_line) || update_mode_lines);
   if (XBUFFER (w->buffer)->clip_changed)
@@ -2447,6 +2451,8 @@
   else
     set_buffer_temp (old);
   TEMP_SET_PT_BOTH (lpoint, lpoint_byte);
+
+  unbind_to (count, Qnil);
 }
 
 /* Do full redisplay on one window, starting at position `pos'. */
@@ -5362,6 +5368,9 @@
   staticpro (&Qredisplay_end_trigger_functions);
   Qredisplay_end_trigger_functions = intern ("redisplay-end-trigger-functions");
 
+  staticpro (&Qinhibit_point_motion_hooks);
+  Qinhibit_point_motion_hooks = intern ("inhibit-point-motion-hooks");
+
   staticpro (&last_arrow_position);
   staticpro (&last_arrow_string);
   last_arrow_position = Qnil;