diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-06-22 19:25:20 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-06-22 19:25:20 +0000 |
commit | 2eab1d2619e9fac6f7f7e4c997053f79be48a79e (patch) | |
tree | f00669a5928300e2a1f9270ac2622285f4951e7a /src/xmenu.c | |
parent | 4fce10a245ed166909a60c972cecade91e167bc5 (diff) | |
download | emacs-2eab1d2619e9fac6f7f7e4c997053f79be48a79e.tar.gz |
(menu_item_enabled_p_1): Special handling for quit.
(set_frame_menubar): Inhibit quitting.
Diffstat (limited to 'src/xmenu.c')
-rw-r--r-- | src/xmenu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xmenu.c b/src/xmenu.c index fc7615e9fdd..f8d3b143ceb 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -435,6 +435,11 @@ static Lisp_Object menu_item_enabled_p_1 (arg) Lisp_Object arg; { + /* If we got a quit from within the menu computation, + quit all the way out of it. This takes care of C-] in the debugger. */ + if (CONSP (arg) && EQ (XCONS (arg)->car, Qquit)) + Fsignal (Qquit, Qnil); + return Qnil; } @@ -1495,9 +1500,12 @@ set_frame_menubar (f, first_time) int i; int id; int count; + int specpdl_count = specpdl_ptr - specpdl; count = inhibit_garbage_collection (); + specbind (Qinhibit_quit, Qt); + id = frame_vector_add_frame (f); wv = malloc_widget_value (); @@ -1599,6 +1607,8 @@ set_frame_menubar (f, first_time) update_frame_menubar (f); + unbind_to (specpdl_count, Qnil); + UNBLOCK_INPUT; } |