diff options
| author | Stefan Monnier | 2013-10-29 17:05:35 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-10-29 17:05:35 -0400 |
| commit | 4c9797cb77cee0d72084567ed8a7e97fcf41abff (patch) | |
| tree | 265ecd2bdf1b46c832f48c3a7a4ffe1378c20ffd /src | |
| parent | dcd163ac993757af6afa129b8625e3ea1c43973a (diff) | |
| download | emacs-4c9797cb77cee0d72084567ed8a7e97fcf41abff.tar.gz emacs-4c9797cb77cee0d72084567ed8a7e97fcf41abff.zip | |
* src/keyboard.c (command_loop_1): If command is nil, call `undefined'.
* lisp/subr.el (undefined): Add missing behavior from the C code for
unbound keys.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/keyboard.c | 23 |
2 files changed, 6 insertions, 21 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index b06279b1a0a..7dab8c0d64e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * keyboard.c (command_loop_1): If command is nil, call `undefined'. | ||
| 4 | |||
| 1 | 2013-10-29 Paul Eggert <eggert@cs.ucla.edu> | 5 | 2013-10-29 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 6 | ||
| 3 | * insdel.c: Fix minor problems found by static checking. | 7 | * insdel.c: Fix minor problems found by static checking. |
diff --git a/src/keyboard.c b/src/keyboard.c index 0ff4cda034a..6831f4d2cad 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1510,27 +1510,8 @@ command_loop_1 (void) | |||
| 1510 | already_adjusted = 0; | 1510 | already_adjusted = 0; |
| 1511 | 1511 | ||
| 1512 | if (NILP (Vthis_command)) | 1512 | if (NILP (Vthis_command)) |
| 1513 | { | 1513 | /* nil means key is undefined. */ |
| 1514 | /* nil means key is undefined. */ | 1514 | call0 (Qundefined); |
| 1515 | Lisp_Object keys = Fvector (i, keybuf); | ||
| 1516 | keys = Fkey_description (keys, Qnil); | ||
| 1517 | bitch_at_user (); | ||
| 1518 | message_with_string ("%s is undefined", keys, 0); | ||
| 1519 | kset_defining_kbd_macro (current_kboard, Qnil); | ||
| 1520 | update_mode_lines = 1; | ||
| 1521 | /* If this is a down-mouse event, don't reset prefix-arg; | ||
| 1522 | pass it to the command run by the up event. */ | ||
| 1523 | if (EVENT_HAS_PARAMETERS (last_command_event)) | ||
| 1524 | { | ||
| 1525 | Lisp_Object breakdown | ||
| 1526 | = parse_modifiers (EVENT_HEAD (last_command_event)); | ||
| 1527 | int modifiers = XINT (XCAR (XCDR (breakdown))); | ||
| 1528 | if (!(modifiers & down_modifier)) | ||
| 1529 | kset_prefix_arg (current_kboard, Qnil); | ||
| 1530 | } | ||
| 1531 | else | ||
| 1532 | kset_prefix_arg (current_kboard, Qnil); | ||
| 1533 | } | ||
| 1534 | else | 1515 | else |
| 1535 | { | 1516 | { |
| 1536 | /* Here for a command that isn't executed directly. */ | 1517 | /* Here for a command that isn't executed directly. */ |