diff options
author | Richard M. Stallman <rms@gnu.org> | 1992-08-19 07:00:42 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1992-08-19 07:00:42 +0000 |
commit | 4c6e656ffe07bdacbe441d3f37fd5eeb74476fba (patch) | |
tree | 0c145926387c16ab223efd1e8bad96c07a2657fe /src/cmds.c | |
parent | ba70da8ff5f8a9387b977d4534a08ac3a577d9a6 (diff) | |
download | emacs-4c6e656ffe07bdacbe441d3f37fd5eeb74476fba.tar.gz |
(internal_self_insert): Ignore value of Fexpand_abbrev;
instead, check whether buf is modified when it returns.
Diffstat (limited to 'src/cmds.c')
-rw-r--r-- | src/cmds.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/cmds.c b/src/cmds.c index 915c185bafc..691a60f5cc0 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -256,6 +256,12 @@ In Auto Fill mode, if no numeric arg, break the preceding line if it's long.") return Qnil; } +/* Insert character C1. If NOAUTOFILL is nonzero, don't do autofill + even if it is enabled. + + If this insertion is suitable for direct output (completely simple), + return 0. A value of 1 indicates this *might* not have been simple. */ + internal_self_insert (c1, noautofill) char c1; int noautofill; @@ -284,8 +290,11 @@ internal_self_insert (c1, noautofill) && NILP (current_buffer->read_only) && point > BEGV && SYNTAX (FETCH_CHAR (point - 1)) == Sword) { - tem = Fexpand_abbrev (); - if (!NILP (tem)) + Fexpand_abbrev (); + /* We can't trust the value of Fexpand_abbrev, + but if the buffer is now changed, this is "hairy" + and not suitable for direct output. */ + if (MODIFF <= current_buffer->save_modified) hairy = 1; } if ((c == ' ' || c == '\n') |