diff options
| author | Stefan Monnier | 2005-03-19 16:36:01 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-03-19 16:36:01 +0000 |
| commit | a18bf8979eefd6716b8755755781e14f86d2c8ab (patch) | |
| tree | 1272ffa823ad38139f258be135308384f916fcf6 /src | |
| parent | dc2ab26eb7487e917b89411a9766f2c480e11be7 (diff) | |
| download | emacs-a18bf8979eefd6716b8755755781e14f86d2c8ab.tar.gz emacs-a18bf8979eefd6716b8755755781e14f86d2c8ab.zip | |
(keys_of_keyboard): Just use `ignore' instead of the redundant `ignore-event'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index eb8d481dc11..f9b0a843de5 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -11427,10 +11427,29 @@ keys_of_keyboard () | |||
| 11427 | 11427 | ||
| 11428 | initial_define_lispy_key (Vspecial_event_map, "delete-frame", | 11428 | initial_define_lispy_key (Vspecial_event_map, "delete-frame", |
| 11429 | "handle-delete-frame"); | 11429 | "handle-delete-frame"); |
| 11430 | /* Here we used to use `ignore-event' which would simple set prefix-arg to | ||
| 11431 | current-prefix-arg, as is done in `handle-switch-frame'. | ||
| 11432 | But `handle-switch-frame is not run from the special-map. | ||
| 11433 | Commands from that map are run in a special way that automatically | ||
| 11434 | preserves the prefix-arg. Restoring the prefix arg here is not just | ||
| 11435 | redundant but harmful: | ||
| 11436 | - C-u C-x v = | ||
| 11437 | - current-prefix-arg is set to non-nil, prefix-arg is set to nil. | ||
| 11438 | - after the first prompt, the exit-minibuffer-hook is run which may | ||
| 11439 | iconify a frame and thus push a `iconify-frame' event. | ||
| 11440 | - after running exit-minibuffer-hook, current-prefix-arg is | ||
| 11441 | restored to the non-nil value it had before the prompt. | ||
| 11442 | - we enter the second prompt. | ||
| 11443 | current-prefix-arg is non-nil, prefix-arg is nil. | ||
| 11444 | - before running the first real event, we run the special iconify-frame | ||
| 11445 | event, but we pass the `special' arg to execute-command so | ||
| 11446 | current-prefix-arg and prefix-arg are left untouched. | ||
| 11447 | - here we foolishly copy the non-nil current-prefix-arg to prefix-arg. | ||
| 11448 | - the next key event will have a spuriously non-nil current-prefix-arg. */ | ||
| 11430 | initial_define_lispy_key (Vspecial_event_map, "iconify-frame", | 11449 | initial_define_lispy_key (Vspecial_event_map, "iconify-frame", |
| 11431 | "ignore-event"); | 11450 | "ignore"); |
| 11432 | initial_define_lispy_key (Vspecial_event_map, "make-frame-visible", | 11451 | initial_define_lispy_key (Vspecial_event_map, "make-frame-visible", |
| 11433 | "ignore-event"); | 11452 | "ignore"); |
| 11434 | /* Handling it at such a low-level causes read_key_sequence to get | 11453 | /* Handling it at such a low-level causes read_key_sequence to get |
| 11435 | * confused because it doesn't realize that the current_buffer was | 11454 | * confused because it doesn't realize that the current_buffer was |
| 11436 | * changed by read_char. | 11455 | * changed by read_char. |