aboutsummaryrefslogtreecommitdiffstats
path: root/src/cmds.c
diff options
context:
space:
mode:
authorStefan Monnier2012-03-25 16:37:21 -0400
committerStefan Monnier2012-03-25 16:37:21 -0400
commit699c782b7668c44d0fa4446331b0590a6d5dac82 (patch)
tree5dcce364741d0761920a3d274b0fc8aba4103d45 /src/cmds.c
parent98fb480ee31bf74cf554044f60f21df16566dd7f (diff)
parente99a9b8bdccadded1f6fae88ee7a2a93dfd4eacf (diff)
downloademacs-pending.tar.gz
emacs-pending.zip
Merge from trunkpending
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cmds.c b/src/cmds.c
index f49cfc221be..a020a447eb1 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -1,6 +1,6 @@
1/* Simple built-in editing commands. 1/* Simple built-in editing commands.
2 2
3Copyright (C) 1985, 1993-1998, 2001-2011 Free Software Foundation, Inc. 3Copyright (C) 1985, 1993-1998, 2001-2012 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -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);