[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117326: Don't try to display menus and dialogs in a
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r117326: Don't try to display menus and dialogs in an 'initial' frame. |
Date: |
Fri, 13 Jun 2014 14:43:29 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117326
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2014-06-13 17:42:43 +0300
message:
Don't try to display menus and dialogs in an 'initial' frame.
src/menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
the frame is the initial frame, because the hook is not set up
then, and Emacs crashes.
Reported by Fabrice Popineau <address@hidden>.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/menu.c menu.c-20091113204419-o5vbwnq5f7feedwu-8676
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-06-12 14:55:48 +0000
+++ b/src/ChangeLog 2014-06-13 14:42:43 +0000
@@ -1,3 +1,10 @@
+2014-06-13 Eli Zaretskii <address@hidden>
+
+ * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
+ the frame is the initial frame, because the hook is not set up
+ then, and Emacs crashes.
+ Reported by Fabrice Popineau <address@hidden>.
+
2014-06-12 Stefan Monnier <address@hidden>
* keymap.c (silly_event_symbol_error): Don't recommend the use
=== modified file 'src/menu.c'
--- a/src/menu.c 2014-06-08 18:27:22 +0000
+++ b/src/menu.c 2014-06-13 14:42:43 +0000
@@ -1410,9 +1410,12 @@
record_unwind_protect_void (discard_menu_items);
#endif
- /* Display them in a menu. */
- selection = FRAME_TERMINAL (f)->menu_show_hook (f, xpos, ypos, menuflags,
- title, &error_name);
+ /* Display them in a menu, but not if F is the initial frame that
+ doesn't have its hooks set (e.g., in a batch session), because
+ such a frame cannot display menus. */
+ if (!FRAME_INITIAL_P (f))
+ selection = FRAME_TERMINAL (f)->menu_show_hook (f, xpos, ypos, menuflags,
+ title, &error_name);
#ifdef HAVE_NS
unbind_to (specpdl_count, Qnil);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117326: Don't try to display menus and dialogs in an 'initial' frame.,
Eli Zaretskii <=