From: Richard M. Stallman Date: Mon, 13 Feb 2006 02:17:15 +0000 (+0000) Subject: (internal_self_insert): Handle weird auto-fill-function. X-Git-Tag: emacs-pretest-22.0.90~4177 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4d94dd9a25e291ad9e59c3f44d40e5a7317ac63d;p=emacs.git (internal_self_insert): Handle weird auto-fill-function. --- diff --git a/src/ChangeLog b/src/ChangeLog index 8c1fffe9911..bd6d28aad6a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-02-12 Richard M. Stallman + + * cmds.c (internal_self_insert): Handle weird auto-fill-function. + 2006-02-11 Eli Zaretskii * keyboard.c (Venable_disabled_menus_and_buttons): New variable. diff --git a/src/cmds.c b/src/cmds.c index f1e92ab2f75..494ef14db99 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -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;