aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmds.c b/src/cmds.c
index f49cfc221be..5a155ac77a5 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -271,7 +271,8 @@ Whichever character you type to run this command is inserted.
271Before insertion, `expand-abbrev' is executed if the inserted character does 271Before insertion, `expand-abbrev' is executed if the inserted character does
272not have word syntax and the previous character in the buffer does. 272not have word syntax and the previous character in the buffer does.
273After insertion, the value of `auto-fill-function' is called if the 273After insertion, the value of `auto-fill-function' is called if the
274`auto-fill-chars' table has a non-nil value for the inserted character. */) 274`auto-fill-chars' table has a non-nil value for the inserted character.
275At the end, it runs `post-self-insert-hook'. */)
275 (Lisp_Object n) 276 (Lisp_Object n)
276{ 277{
277 int remove_boundary = 1; 278 int remove_boundary = 1;
@@ -471,7 +472,7 @@ internal_self_insert (int c, EMACS_INT n)
471 { 472 {
472 USE_SAFE_ALLOCA; 473 USE_SAFE_ALLOCA;
473 char *strn, *p; 474 char *strn, *p;
474 SAFE_ALLOCA (strn, char *, n * len); 475 SAFE_NALLOCA (strn, len, n);
475 for (p = strn; n > 0; n--, p += len) 476 for (p = strn; n > 0; n--, p += len)
476 memcpy (p, str, len); 477 memcpy (p, str, len);
477 insert_and_inherit (strn, p - strn); 478 insert_and_inherit (strn, p - strn);