From 4d94dd9a25e291ad9e59c3f44d40e5a7317ac63d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 13 Feb 2006 02:17:15 +0000 Subject: [PATCH] (internal_self_insert): Handle weird auto-fill-function. --- src/ChangeLog | 4 ++++ src/cmds.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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; -- 2.39.2