[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116376: * cmds.c (Fself_insert_command): Output a c
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] trunk r116376: * cmds.c (Fself_insert_command): Output a clearer error message on negative repetitions. |
Date: |
Sun, 09 Feb 2014 06:33:49 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116376
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/9476
committer: Lars Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sat 2014-02-08 22:32:30 -0800
message:
* cmds.c (Fself_insert_command): Output a clearer error message on negative
repetitions.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/cmds.c cmds.c-20091113204419-o5vbwnq5f7feedwu-214
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-02-09 01:48:47 +0000
+++ b/src/ChangeLog 2014-02-09 06:32:30 +0000
@@ -1,5 +1,8 @@
2014-02-09 Lars Ingebrigtsen <address@hidden>
+ * cmds.c (Fself_insert_command): Output a clearer error message on
+ negative repetitions (bug#9476).
+
* macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
2014-02-08 Lars Ingebrigtsen <address@hidden>
=== modified file 'src/cmds.c'
--- a/src/cmds.c 2014-01-01 07:43:34 +0000
+++ b/src/cmds.c 2014-02-09 06:32:30 +0000
@@ -268,6 +268,7 @@
DEFUN ("self-insert-command", Fself_insert_command, Sself_insert_command, 1,
1, "p",
doc: /* Insert the character you type.
Whichever character you type to run this command is inserted.
+The numeric prefix argument N says how many times to repeat the insertion.
Before insertion, `expand-abbrev' is executed if the inserted character does
not have word syntax and the previous character in the buffer does.
After insertion, the value of `auto-fill-function' is called if the
@@ -276,7 +277,11 @@
(Lisp_Object n)
{
bool remove_boundary = 1;
- CHECK_NATNUM (n);
+ CHECK_NUMBER (n);
+
+ if (XFASTINT (n) < 1)
+ error ("Repetition argument is %d, but must be higher than 0.",
+ XFASTINT (n));
if (!EQ (Vthis_command, KVAR (current_kboard, Vlast_command)))
nonundocount = 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116376: * cmds.c (Fself_insert_command): Output a clearer error message on negative repetitions.,
Lars Ingebrigtsen <=