diff options
Diffstat (limited to 'src/cmds.c')
| -rw-r--r-- | src/cmds.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cmds.c b/src/cmds.c index 8d61c19fb3c..29c574abb14 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -268,6 +268,7 @@ static int nonundocount; | |||
| 268 | DEFUN ("self-insert-command", Fself_insert_command, Sself_insert_command, 1, 1, "p", | 268 | DEFUN ("self-insert-command", Fself_insert_command, Sself_insert_command, 1, 1, "p", |
| 269 | doc: /* Insert the character you type. | 269 | doc: /* Insert the character you type. |
| 270 | Whichever character you type to run this command is inserted. | 270 | Whichever character you type to run this command is inserted. |
| 271 | The numeric prefix argument N says how many times to repeat the insertion. | ||
| 271 | Before insertion, `expand-abbrev' is executed if the inserted character does | 272 | Before insertion, `expand-abbrev' is executed if the inserted character does |
| 272 | not have word syntax and the previous character in the buffer does. | 273 | not have word syntax and the previous character in the buffer does. |
| 273 | After insertion, the value of `auto-fill-function' is called if the | 274 | After insertion, the value of `auto-fill-function' is called if the |
| @@ -276,7 +277,11 @@ At the end, it runs `post-self-insert-hook'. */) | |||
| 276 | (Lisp_Object n) | 277 | (Lisp_Object n) |
| 277 | { | 278 | { |
| 278 | bool remove_boundary = 1; | 279 | bool remove_boundary = 1; |
| 279 | CHECK_NATNUM (n); | 280 | CHECK_NUMBER (n); |
| 281 | |||
| 282 | if (XFASTINT (n) < 1) | ||
| 283 | error ("Repetition argument is %d, but must be higher than 0.", | ||
| 284 | XFASTINT (n)); | ||
| 280 | 285 | ||
| 281 | if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command))) | 286 | if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command))) |
| 282 | nonundocount = 0; | 287 | nonundocount = 0; |