# HG changeset patch # User Gerd Moellmann # Date 949349557 0 # Node ID d26783d86d5fe68faa9214d601f0afac1c372c28 # Parent 9299c470e56635abbfbd572bf34a5e71cfc67b18 (Ftrace_to_stderr) [GLYPH_DEBUG]: New function. (syms_of_xdisp) [GLYPH_DEBUG]: Defsubr it. diff -r 9299c470e566 -r d26783d86d5f src/xdisp.c --- 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);