diff options
| author | Jim Blandy | 1993-05-28 08:48:33 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-05-28 08:48:33 +0000 |
| commit | db60d856e8de8cbfa2e34cfaf301df7a7b0b6c59 (patch) | |
| tree | da95399fa800500e8bc6da46461eecfd4ffa34fe /src | |
| parent | 5c851ea7d35fa9027b5fb9e52472bdad71c02644 (diff) | |
| download | emacs-db60d856e8de8cbfa2e34cfaf301df7a7b0b6c59.tar.gz emacs-db60d856e8de8cbfa2e34cfaf301df7a7b0b6c59.zip | |
* keyboard.c (menu_bar_items): Bind Qinhibit_quit to Qt while we
call the keymap accessors; this gets called during redisplay.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index f1b577ed70f..97527896704 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3059,6 +3059,8 @@ static Lisp_Object menu_bar_one_keymap (); | |||
| 3059 | Lisp_Object | 3059 | Lisp_Object |
| 3060 | menu_bar_items () | 3060 | menu_bar_items () |
| 3061 | { | 3061 | { |
| 3062 | int count = specpdl_ptr - specpdl; | ||
| 3063 | |||
| 3062 | /* The number of keymaps we're scanning right now, and the number of | 3064 | /* The number of keymaps we're scanning right now, and the number of |
| 3063 | keymaps we have allocated space for. */ | 3065 | keymaps we have allocated space for. */ |
| 3064 | int nmaps; | 3066 | int nmaps; |
| @@ -3073,6 +3075,12 @@ menu_bar_items () | |||
| 3073 | 3075 | ||
| 3074 | int mapno; | 3076 | int mapno; |
| 3075 | 3077 | ||
| 3078 | /* In order to build the menus, we need to call the keymap | ||
| 3079 | accessors. They all call QUIT. But this function is called | ||
| 3080 | during redisplay, during which a quit is fatal. So inhibit | ||
| 3081 | quitting while building the menus. */ | ||
| 3082 | specbind (Qinhibit_quit, Qt); | ||
| 3083 | |||
| 3076 | /* Build our list of keymaps. | 3084 | /* Build our list of keymaps. |
| 3077 | If we recognize a function key and replace its escape sequence in | 3085 | If we recognize a function key and replace its escape sequence in |
| 3078 | keybuf with its symbol, or if the sequence starts with a mouse | 3086 | keybuf with its symbol, or if the sequence starts with a mouse |
| @@ -3108,7 +3116,7 @@ menu_bar_items () | |||
| 3108 | result = menu_bar_one_keymap (def, result); | 3116 | result = menu_bar_one_keymap (def, result); |
| 3109 | } | 3117 | } |
| 3110 | 3118 | ||
| 3111 | return Fnreverse (result); | 3119 | return unbind_to (count, Fnreverse (result)); |
| 3112 | } | 3120 | } |
| 3113 | 3121 | ||
| 3114 | /* Scan one map KEYMAP, accumulating any menu items it defines | 3122 | /* Scan one map KEYMAP, accumulating any menu items it defines |