]> git.eshelyaron.com Git - emacs.git/commitdiff
(internal_self_insert): Handle weird auto-fill-function.
authorRichard M. Stallman <rms@gnu.org>
Mon, 13 Feb 2006 02:17:15 +0000 (02:17 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 13 Feb 2006 02:17:15 +0000 (02:17 +0000)
src/ChangeLog
src/cmds.c

index 8c1fffe991109e27289b5c962b6c5a10531e4a00..bd6d28aad6a6f80218267db2be059dac4bdbc025 100644 (file)
@@ -1,3 +1,7 @@
+2006-02-12  Richard M. Stallman  <rms@gnu.org>
+
+       * cmds.c (internal_self_insert): Handle weird auto-fill-function.
+
 2006-02-11  Eli Zaretskii  <eliz@gnu.org>
 
        * keyboard.c (Venable_disabled_menus_and_buttons): New variable.
index f1e92ab2f75014e430113eb190123d28f938fc64..494ef14db994f55e54412bf0f91453849e774474 100644 (file)
@@ -528,7 +528,8 @@ internal_self_insert (c, noautofill)
           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;