Mercurial > hg > xemacs-beta
comparison src/event-stream.c @ 5371:6f10ac29bf40
Be better about searching for chars typed via XIM and x-compose.el, isearch
lisp/ChangeLog addition:
2011-03-12 Aidan Kehoe <kehoea@parhasard.net>
* isearch-mode.el (isearch-mode-map):
Document why we bind the ASCII characters to isearch-printing-char
in more detail.
* isearch-mode.el (isearch-maybe-frob-keyboard-macros):
If `this-command' is nil and the keys typed would normally be
bound to `self-insert-command' in the global map, force
`isearch-printing-char' to be called with an appropriate value for
last-command-event. Addresses an issue where searching for
characters generated from x-compose.el and XIM threw errors for me
in dired.
src/ChangeLog addition:
2011-03-12 Aidan Kehoe <kehoea@parhasard.net>
* event-stream.c (Fdispatch_event):
As documented, allow pre-command-hook to usefully modify
this-command even when this-command is nil (that is, we would
normally throw an undefined-keystroke-sequence error). Don't throw
that error if this-command was modified, instead try to execute
the new value.
Allow pre-command-hook to modify last-command-event in this
specific context. Don't document this, for the moment.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 12 Mar 2011 13:11:31 +0000 |
parents | c096d8051f89 |
children | 3889ef128488 ac37a5f7e5be |
comparison
equal
deleted
inserted
replaced
5370:4c4b96b13f70 | 5371:6f10ac29bf40 |
---|---|
4443 case button_release_event: | 4443 case button_release_event: |
4444 case key_press_event: | 4444 case key_press_event: |
4445 { | 4445 { |
4446 Lisp_Object leaf = lookup_command_event (command_builder, event, 1); | 4446 Lisp_Object leaf = lookup_command_event (command_builder, event, 1); |
4447 | 4447 |
4448 lookedup: | |
4448 if (KEYMAPP (leaf)) | 4449 if (KEYMAPP (leaf)) |
4449 /* Incomplete key sequence */ | 4450 /* Incomplete key sequence */ |
4450 break; | 4451 break; |
4451 if (NILP (leaf)) | 4452 if (NILP (leaf)) |
4452 { | 4453 { |
4522 key. */ | 4523 key. */ |
4523 Vthis_command = Qnil; | 4524 Vthis_command = Qnil; |
4524 GCPRO1 (keys); | 4525 GCPRO1 (keys); |
4525 pre_command_hook (); | 4526 pre_command_hook (); |
4526 UNGCPRO; | 4527 UNGCPRO; |
4528 | |
4529 if (!NILP (Vthis_command)) | |
4530 { | |
4531 /* Allow pre-command-hook to change the command to | |
4532 something more useful, and avoid barfing. */ | |
4533 leaf = Vthis_command; | |
4534 if (!EQ (command_builder->most_current_event, | |
4535 Vlast_command_event)) | |
4536 { | |
4537 reset_current_events (command_builder); | |
4538 command_builder_append_event (command_builder, | |
4539 Vlast_command_event); | |
4540 } | |
4541 goto lookedup; | |
4542 } | |
4543 | |
4527 /* The post-command-hook doesn't run. */ | 4544 /* The post-command-hook doesn't run. */ |
4528 Fsignal (Qundefined_keystroke_sequence, list1 (keys)); | 4545 Fsignal (Qundefined_keystroke_sequence, list1 (keys)); |
4529 } | 4546 } |
4530 /* Reset the command builder for reading the next sequence. */ | 4547 /* Reset the command builder for reading the next sequence. */ |
4531 reset_this_command_keys (console, 1); | 4548 reset_this_command_keys (console, 1); |