changeset 5808:995860e5f342

(menu_bar_item): Use internal_condition_case_1. (menu_bar_item_1): New function.
author Richard M. Stallman <rms@gnu.org>
date Mon, 07 Feb 1994 01:03:39 +0000
parents cc9d9ab24008
children 1493700a3d78
files src/keyboard.c
diffstat 1 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Mon Feb 07 01:02:05 1994 +0000
+++ b/src/keyboard.c	Mon Feb 07 01:03:39 1994 +0000
@@ -3586,6 +3586,15 @@
   return result;
 }
 
+/* This is used as the handler when calling internal_condition_case_1.  */
+
+static Lisp_Object
+menu_bar_item_1 (arg)
+     Lisp_Object arg;
+{
+  return Qnil;
+}
+
 static Lisp_Object
 menu_bar_item (key, item_string, def, result)
      Lisp_Object key, item_string, def, result;
@@ -3610,7 +3619,10 @@
 	 Otherwise, enable if value is not nil.  */
       tem = Fget (def, Qmenu_enable);
       if (!NILP (tem))
-	enabled = Feval (tem);
+	/* (condition-case nil (eval tem)
+	     (error nil))  */
+	enabled = internal_condition_case_1 (Feval, tem, Qerror,
+					     menu_bar_item_1);
     }
 
   /* Add an entry for this key and string