changeset 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 6a3bf61d8473
children 35d75a010599
files src/cmds.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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;