diff src/cmds.c @ 68839:14ada287f3fd

(internal_self_insert): Handle weird auto-fill-function.
author Richard M. Stallman <rms@gnu.org>
date Mon, 13 Feb 2006 02:17:10 +0000
parents 3bd95f4f2941
children a0c56d32ce9f d57ee9eab157
line wrap: on
line diff
--- a/src/cmds.c	Mon Feb 13 01:59:00 2006 +0000
+++ b/src/cmds.c	Mon Feb 13 02:17:10 2006 +0000
@@ -528,7 +528,8 @@
 	   justification, if any, know where the end is going to be.  */
 	SET_PT_BOTH (PT - 1, PT_BYTE - 1);
       tem = call0 (current_buffer->auto_fill_function);
-      if (c == '\n')
+      /* Test PT < ZV in case the auto-fill-function is strange.  */
+      if (c == '\n' && PT < ZV)
 	SET_PT_BOTH (PT + 1, PT_BYTE + 1);
       if (!NILP (tem))
 	hairy = 2;