changeset 15262:b455f3f77823

(internal_self_insert): Don't return 2 for auto-fill unless the auto_fill_function returns non-nil.
author Karl Heuer <kwzh@gnu.org>
date Tue, 21 May 1996 14:29:56 +0000
parents bd56cdc4d07b
children 0d7899c372ed
files src/cmds.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cmds.c	Mon May 20 21:07:10 1996 +0000
+++ b/src/cmds.c	Tue May 21 14:29:56 1996 +0000
@@ -331,16 +331,19 @@
       && !noautofill
       && !NILP (current_buffer->auto_fill_function))
     {
+      Lisp_Object tem;
+
       insert_and_inherit (&c1, 1);
       if (c1 == '\n')
 	/* After inserting a newline, move to previous line and fill */
 	/* that.  Must have the newline in place already so filling and */
 	/* justification, if any, know where the end is going to be. */
 	SET_PT (point - 1);
-      call0 (current_buffer->auto_fill_function);
+      tem = call0 (current_buffer->auto_fill_function);
       if (c1 == '\n')
 	SET_PT (point + 1);
-      hairy = 2;
+      if (!NILP (tem))
+	hairy = 2;
     }
   else
     insert_and_inherit (&c1, 1);