diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-02-07 01:03:39 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-02-07 01:03:39 +0000 |
commit | 5bd5d0c922197244fb40b1e92cfd31d868f28e8c (patch) | |
tree | 5c13b27a7b6e83dc8d51837abcfff67e38384f3f /src/keyboard.c | |
parent | 8d88a966d6640e44a32e445596a9c2fe0cd3f2a8 (diff) | |
download | emacs-5bd5d0c922197244fb40b1e92cfd31d868f28e8c.tar.gz |
(menu_bar_item): Use internal_condition_case_1.
(menu_bar_item_1): New function.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index da4ca46b676..27894429596 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3586,6 +3586,15 @@ menu_bar_one_keymap (keymap, result) 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 @@ menu_bar_item (key, item_string, def, result) 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 |