Mercurial > emacs
changeset 12869:2304fcfade47
(Fself_insert_command): Optimize the case with arg > 2
to avoid running change hooks lots of times.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 16 Aug 1995 15:00:57 +0000 |
parents | 8c777db02099 |
children | 1372454cb5e5 |
files | src/cmds.c |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cmds.c Wed Aug 16 14:41:11 1995 +0000 +++ b/src/cmds.c Wed Aug 16 15:00:57 1995 +0000 @@ -221,6 +221,18 @@ /* Barf if the key that invoked this was not a character. */ if (!INTEGERP (last_command_char)) bitch_at_user (); + else if (XINT (arg) >= 2 && NILP (current_buffer->overwrite_mode)) + { + XSETFASTINT (arg, XFASTINT (arg) - 2); + /* The first one might want to expand an abbrev. */ + internal_self_insert (XINT (last_command_char), 1); + /* The bulk of the copies of this char can be inserted simply. + We don't have to handle a user-specified face specially + because it will get inherited from the first char inserted. */ + Finsert_char (last_command_char, arg, Qt); + /* The last one might want to auto-fill. */ + internal_self_insert (XINT (last_command_char), 0); + } else while (XINT (arg) > 0) { @@ -313,7 +325,8 @@ #endif synt = SYNTAX (c); if ((synt == Sclose || synt == Smath) - && !NILP (Vblink_paren_function) && INTERACTIVE) + && !NILP (Vblink_paren_function) && INTERACTIVE + && !noautofill) { call0 (Vblink_paren_function); hairy = 2;