diff options
author | Karl Heuer <kwzh@gnu.org> | 1996-05-21 14:29:56 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1996-05-21 14:29:56 +0000 |
commit | 45d702e2675c7188a3de471abe9b2d8c4c4870db (patch) | |
tree | 7d81306b567e7101b01ab1f0826fe9e746574504 | |
parent | 19f2ab1d0c8b49401a4f428408816eeb9657e350 (diff) | |
download | emacs-45d702e2675c7188a3de471abe9b2d8c4c4870db.tar.gz |
(internal_self_insert): Don't return 2 for auto-fill
unless the auto_fill_function returns non-nil.
-rw-r--r-- | src/cmds.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cmds.c b/src/cmds.c index 3bebb798dd5..5c0f7cd4751 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -331,16 +331,19 @@ internal_self_insert (c1, noautofill) && !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); |