mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-29 09:43:56 -07:00
(internal_self_insert): Don't return 2 for auto-fill
unless the auto_fill_function returns non-nil.
This commit is contained in:
parent
b035a6780c
commit
76bb6dbb3e
1 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue