aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-09-25 18:44:59 +0000
committerRichard M. Stallman1995-09-25 18:44:59 +0000
commit68f297c5d3fffb0f70c72971b43d00e3092565f3 (patch)
tree4d306a99510e4afe28993e6b4283fdc006912468 /src
parent060ffec189657249c946185194b79effdc2be984 (diff)
downloademacs-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.c21
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
1058Lisp_Object Fcommand_execute (); 1058Lisp_Object Fcommand_execute ();
1059static int read_key_sequence (); 1059static int read_key_sequence ();
1060static void safe_run_hooks (); 1060void safe_run_hooks ();
1061 1061
1062Lisp_Object 1062Lisp_Object
1063command_loop_1 () 1063command_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
1461static void 1461void
1462safe_run_hooks (hook) 1462safe_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. */