Mercurial > hg > xemacs-beta
comparison src/event-stream.c @ 5473:ac37a5f7e5be
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Thu, 17 Mar 2011 23:42:59 +0100 |
parents | 8d29f1c4bb98 6f10ac29bf40 |
children | 4dee0387b9de |
comparison
equal
deleted
inserted
replaced
5472:e79980ee5efe | 5473:ac37a5f7e5be |
---|---|
4441 case button_release_event: | 4441 case button_release_event: |
4442 case key_press_event: | 4442 case key_press_event: |
4443 { | 4443 { |
4444 Lisp_Object leaf = lookup_command_event (command_builder, event, 1); | 4444 Lisp_Object leaf = lookup_command_event (command_builder, event, 1); |
4445 | 4445 |
4446 lookedup: | |
4446 if (KEYMAPP (leaf)) | 4447 if (KEYMAPP (leaf)) |
4447 /* Incomplete key sequence */ | 4448 /* Incomplete key sequence */ |
4448 break; | 4449 break; |
4449 if (NILP (leaf)) | 4450 if (NILP (leaf)) |
4450 { | 4451 { |
4520 key. */ | 4521 key. */ |
4521 Vthis_command = Qnil; | 4522 Vthis_command = Qnil; |
4522 GCPRO1 (keys); | 4523 GCPRO1 (keys); |
4523 pre_command_hook (); | 4524 pre_command_hook (); |
4524 UNGCPRO; | 4525 UNGCPRO; |
4526 | |
4527 if (!NILP (Vthis_command)) | |
4528 { | |
4529 /* Allow pre-command-hook to change the command to | |
4530 something more useful, and avoid barfing. */ | |
4531 leaf = Vthis_command; | |
4532 if (!EQ (command_builder->most_current_event, | |
4533 Vlast_command_event)) | |
4534 { | |
4535 reset_current_events (command_builder); | |
4536 command_builder_append_event (command_builder, | |
4537 Vlast_command_event); | |
4538 } | |
4539 goto lookedup; | |
4540 } | |
4541 | |
4525 /* The post-command-hook doesn't run. */ | 4542 /* The post-command-hook doesn't run. */ |
4526 Fsignal (Qundefined_keystroke_sequence, list1 (keys)); | 4543 Fsignal (Qundefined_keystroke_sequence, list1 (keys)); |
4527 } | 4544 } |
4528 /* Reset the command builder for reading the next sequence. */ | 4545 /* Reset the command builder for reading the next sequence. */ |
4529 reset_this_command_keys (console, 1); | 4546 reset_this_command_keys (console, 1); |