diff options
| author | Richard M. Stallman | 1995-09-25 18:44:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-09-25 18:44:59 +0000 |
| commit | 68f297c5d3fffb0f70c72971b43d00e3092565f3 (patch) | |
| tree | 4d306a99510e4afe28993e6b4283fdc006912468 /src | |
| parent | 060ffec189657249c946185194b79effdc2be984 (diff) | |
| download | emacs-68f297c5d3fffb0f70c72971b43d00e3092565f3.tar.gz emacs-68f297c5d3fffb0f70c72971b43d00e3092565f3.zip | |
(safe_run_hooks): No longer static.
(read_char_x_menu_prompt):
When unreading events generated by a menu,
turn symbols and integers into lists,
for the sake of last_nonmenu_event and thus y-or-n-p.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 018b8201959..b4401f4fd62 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1057,7 +1057,7 @@ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, | |||
| 1057 | 1057 | ||
| 1058 | Lisp_Object Fcommand_execute (); | 1058 | Lisp_Object Fcommand_execute (); |
| 1059 | static int read_key_sequence (); | 1059 | static int read_key_sequence (); |
| 1060 | static void safe_run_hooks (); | 1060 | void safe_run_hooks (); |
| 1061 | 1061 | ||
| 1062 | Lisp_Object | 1062 | Lisp_Object |
| 1063 | command_loop_1 () | 1063 | command_loop_1 () |
| @@ -1458,7 +1458,7 @@ safe_run_hooks_error (data) | |||
| 1458 | to be nil. Also inhibit quits, so that C-g won't cause the hook | 1458 | to be nil. Also inhibit quits, so that C-g won't cause the hook |
| 1459 | to mysteriously evaporate. */ | 1459 | to mysteriously evaporate. */ |
| 1460 | 1460 | ||
| 1461 | static void | 1461 | void |
| 1462 | safe_run_hooks (hook) | 1462 | safe_run_hooks (hook) |
| 1463 | Lisp_Object hook; | 1463 | Lisp_Object hook; |
| 1464 | { | 1464 | { |
| @@ -4791,6 +4791,23 @@ read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu) | |||
| 4791 | value = Fx_popup_menu (prev_event, Flist (nmaps1, realmaps)); | 4791 | value = Fx_popup_menu (prev_event, Flist (nmaps1, realmaps)); |
| 4792 | if (CONSP (value)) | 4792 | if (CONSP (value)) |
| 4793 | { | 4793 | { |
| 4794 | Lisp_Object tem; | ||
| 4795 | |||
| 4796 | /* If we got multiple events, unread all but | ||
| 4797 | the first. | ||
| 4798 | There is no way to prevent those unread events | ||
| 4799 | from showing up later in last_nonmenu_event. | ||
| 4800 | So turn symbol and integer events into lists, | ||
| 4801 | to indicate that they came from a mouse menu, | ||
| 4802 | so that when present in last_nonmenu_event | ||
| 4803 | they won't confuse things. */ | ||
| 4804 | for (tem = XCONS (value)->cdr; !NILP (tem); | ||
| 4805 | tem = XCONS (tem)->cdr) | ||
| 4806 | if (SYMBOLP (XCONS (tem)->car) | ||
| 4807 | || INTEGERP (XCONS (tem)->car)) | ||
| 4808 | XCONS (tem)->car | ||
| 4809 | = Fcons (XCONS (tem)->car, Qnil); | ||
| 4810 | |||
| 4794 | /* If we got more than one event, put all but the first | 4811 | /* If we got more than one event, put all but the first |
| 4795 | onto this list to be read later. | 4812 | onto this list to be read later. |
| 4796 | Return just the first event now. */ | 4813 | Return just the first event now. */ |