changeset 27540:d26783d86d5f

(Ftrace_to_stderr) [GLYPH_DEBUG]: New function. (syms_of_xdisp) [GLYPH_DEBUG]: Defsubr it.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 31 Jan 2000 20:12:37 +0000
parents 9299c470e566
children a980b6571ea9
files src/xdisp.c
diffstat 1 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Jan 31 20:11:54 2000 +0000
+++ b/src/xdisp.c	Mon Jan 31 20:12:37 2000 +0000
@@ -10026,13 +10026,17 @@
      only if buffer has really changed.  The reason is that the gap is
      initially at Z for freshly visited files.  The code below would
      set end_unchanged to 0 in that case.  */
-  if (MODIFF > 1)
+  if (MODIFF > SAVE_MODIFF)
     {
       if (GPT - BEG < BEG_UNCHANGED)
 	BEG_UNCHANGED = GPT - BEG;
       if (Z - GPT < END_UNCHANGED)
 	END_UNCHANGED = Z - GPT;
     }
+
+  /* Some strange bug seems to be causing that to happen sometimes.  */
+  if (BEG_UNCHANGED + END_UNCHANGED > Z_BYTE)
+    abort ();
   
   /* If window starts after a line end, and the last change is in
      front of that newline, then changes don't affect the display.
@@ -10691,7 +10695,17 @@
   trace_redisplay_p = !trace_redisplay_p;
   return Qnil;
 }
-       
+
+
+DEFUN ("trace-to-stderr", Ftrace_to_stderr, Strace_to_stderr, 1, 1, "",
+   "Print STRING to stderr.")
+   (string)
+     Lisp_Object string;
+{
+  CHECK_STRING (string, 0);
+  fprintf (stderr, "%s", XSTRING (string)->data);
+  return Qnil;
+}
 	
 #endif /* GLYPH_DEBUG */
 
@@ -12802,6 +12816,7 @@
   defsubr (&Sdump_glyph_row);
   defsubr (&Sdump_tool_bar_row);
   defsubr (&Strace_redisplay_toggle);
+  defsubr (&Strace_to_stderr);
 #endif
 
   staticpro (&Qmenu_bar_update_hook);