]> code.delx.au - gnu-emacs/blobdiff - src/indent.c
Merged from miles@gnu.org--gnu-2005 (patch 67, 270-278)
[gnu-emacs] / src / indent.c
index 39602c60d167e13cab8329771d0725eb0c454716..d6709d56ee891a41a7f7e775e3b0ee8592f4a5cc 100644 (file)
@@ -67,6 +67,8 @@ static double position_indentation P_ ((int));
 
 int current_column_bol_cache;
 
+extern Lisp_Object Qfontification_functions;
+
 /* Get the display table to use for the current buffer.  */
 
 struct Lisp_Char_Table *
@@ -2049,6 +2051,7 @@ whether or not it is currently displayed in some window.  */)
   struct window *w;
   Lisp_Object old_buffer;
   struct gcpro gcpro1;
+  int count = SPECPDL_INDEX ();
 
   CHECK_NUMBER (lines);
   if (! NILP (window))
@@ -2066,6 +2069,9 @@ whether or not it is currently displayed in some window.  */)
       XSETBUFFER (w->buffer, current_buffer);
     }
 
+  /* Don't fontify text that we just move across.  */
+  specbind (Qfontification_functions, Qnil);
+
   if (noninteractive)
     {
       struct position pos;
@@ -2111,6 +2117,7 @@ whether or not it is currently displayed in some window.  */)
   if (BUFFERP (old_buffer))
     w->buffer = old_buffer;
 
+  unbind_to (count, Qnil);
   RETURN_UNGCPRO (make_number (it.vpos));
 }