diff src/xmenu.c @ 5809:1493700a3d78

(single_keymap_panes): Use internal_condition_case_1. (single_keymap_panes_1): New function.
author Richard M. Stallman <rms@gnu.org>
date Mon, 07 Feb 1994 01:05:06 +0000
parents 07a36e38e514
children 8dc616f310e8
line wrap: on
line diff
--- a/src/xmenu.c	Mon Feb 07 01:03:39 1994 +0000
+++ b/src/xmenu.c	Mon Feb 07 01:05:06 1994 +0000
@@ -1149,7 +1149,16 @@
   return p;
 }
 
-/* This is a recursive subroutine of the previous function.
+/* This is used as the handler when calling internal_condition_case_1.  */
+
+static Lisp_Object
+single_keymap_panes_1 (arg)
+     Lisp_Object arg;
+{
+  return Qnil;
+}
+
+/* This is a recursive subroutine of keymap_panes.
    It handles one keymap, KEYMAP.
    The other arguments are passed along
    or point to local variables of the previous function.  */
@@ -1246,7 +1255,11 @@
 			 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,
+							     single_keymap_panes_1);
 		    }
 		  tem = Fkeymapp (def);
 		  if (XSTRING (item2)->data[0] == '@' && !NILP (tem))
@@ -1291,7 +1304,11 @@
 			  /* No property, or nil, means enable.
 			     Otherwise, enable if value is not nil.  */
 			  if (!NILP (tem))
-			    enabled = Feval (tem);
+			    /* (condition-case nil (eval tem)
+			       (error nil))  */
+			    enabled = internal_condition_case_1 (Feval, tem,
+								 Qerror,
+								 single_keymap_panes_1);
 			}
 
 		      tem = Fkeymapp (def);