diff options
| author | Karl Heuer | 1996-05-21 14:29:56 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-05-21 14:29:56 +0000 |
| commit | 76bb6dbb3e78548cb7323da2602779b1bf1d1106 (patch) | |
| tree | 68dc47f0e4633fc4e136dd181c88c32c8693448e /src/cmds.c | |
| parent | b035a6780c3c5336e95ab4a42fc9e38aaab6cf89 (diff) | |
| download | emacs-76bb6dbb3e78548cb7323da2602779b1bf1d1106.tar.gz emacs-76bb6dbb3e78548cb7323da2602779b1bf1d1106.zip | |
(internal_self_insert): Don't return 2 for auto-fill
unless the auto_fill_function returns non-nil.
Diffstat (limited to 'src/cmds.c')
| -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) | |||
| 331 | && !noautofill | 331 | && !noautofill |
| 332 | && !NILP (current_buffer->auto_fill_function)) | 332 | && !NILP (current_buffer->auto_fill_function)) |
| 333 | { | 333 | { |
| 334 | Lisp_Object tem; | ||
| 335 | |||
| 334 | insert_and_inherit (&c1, 1); | 336 | insert_and_inherit (&c1, 1); |
| 335 | if (c1 == '\n') | 337 | if (c1 == '\n') |
| 336 | /* After inserting a newline, move to previous line and fill */ | 338 | /* After inserting a newline, move to previous line and fill */ |
| 337 | /* that. Must have the newline in place already so filling and */ | 339 | /* that. Must have the newline in place already so filling and */ |
| 338 | /* justification, if any, know where the end is going to be. */ | 340 | /* justification, if any, know where the end is going to be. */ |
| 339 | SET_PT (point - 1); | 341 | SET_PT (point - 1); |
| 340 | call0 (current_buffer->auto_fill_function); | 342 | tem = call0 (current_buffer->auto_fill_function); |
| 341 | if (c1 == '\n') | 343 | if (c1 == '\n') |
| 342 | SET_PT (point + 1); | 344 | SET_PT (point + 1); |
| 343 | hairy = 2; | 345 | if (!NILP (tem)) |
| 346 | hairy = 2; | ||
| 344 | } | 347 | } |
| 345 | else | 348 | else |
| 346 | insert_and_inherit (&c1, 1); | 349 | insert_and_inherit (&c1, 1); |