changeset 12361:5b1c79dd5063

(menu_item_enabled_p_1): Special handling for quit. (set_frame_menubar): Inhibit quitting.
author Richard M. Stallman <rms@gnu.org>
date Thu, 22 Jun 1995 19:25:20 +0000
parents 8c5226231593
children 03e8afdeabb3
files src/xmenu.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmenu.c	Thu Jun 22 18:58:28 1995 +0000
+++ b/src/xmenu.c	Thu Jun 22 19:25:20 1995 +0000
@@ -435,6 +435,11 @@
 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 @@
   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 @@
 
   update_frame_menubar (f);
 
+  unbind_to (specpdl_count, Qnil);
+
   UNBLOCK_INPUT;
 }