summaryrefslogtreecommitdiff
path: root/src/cmds.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2006-02-13 02:17:15 +0000
committerRichard M. Stallman <rms@gnu.org>2006-02-13 02:17:15 +0000
commit4d94dd9a25e291ad9e59c3f44d40e5a7317ac63d (patch)
treec0c0616ef828d3a93e0057a9b7516b061500237c /src/cmds.c
parent3715419e9ee01c49e2b846fa8322c80db5629d6d (diff)
downloademacs-4d94dd9a25e291ad9e59c3f44d40e5a7317ac63d.tar.gz
(internal_self_insert): Handle weird auto-fill-function.
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c3
1 files changed, 2 insertions, 1 deletions
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;