diff options
| author | Stefan Monnier | 2000-10-04 23:16:46 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-10-04 23:16:46 +0000 |
| commit | 35810b6fff166eb28ff908b7d4f1d974fd9d4fca (patch) | |
| tree | c39746c436a34fe383b1f55b28efcf95c0396885 | |
| parent | 55d5d71752cfbc323ce78e08e6fc661036e5ed84 (diff) | |
| download | emacs-35810b6fff166eb28ff908b7d4f1d974fd9d4fca.tar.gz emacs-35810b6fff166eb28ff908b7d4f1d974fd9d4fca.zip | |
(Fwhere_is_internal): Ignore `menu-bar' and `tool-bar'.
(where_is_internal_1): Don't bother ignoring menu-items any more.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keymap.c | 32 |
2 files changed, 14 insertions, 23 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 4277f5fd45b..40b21ea1a26 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-10-04 Stefan Monnier <monnier@cs.yale.edu> | ||
| 2 | |||
| 3 | * keymap.c (Fwhere_is_internal): Ignore `menu-bar' and `tool-bar'. | ||
| 4 | (where_is_internal_1): Don't bother ignoring menu-items any more. | ||
| 5 | |||
| 1 | 2000-10-04 Gerd Moellmann <gerd@gnu.org> | 6 | 2000-10-04 Gerd Moellmann <gerd@gnu.org> |
| 2 | 7 | ||
| 3 | * keyboard.c (update_menu_bindings): New variable. | 8 | * keyboard.c (update_menu_bindings): New variable. |
diff --git a/src/keymap.c b/src/keymap.c index a9b659804cd..8921f53689b 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2170,6 +2170,14 @@ indirect definition itself.") | |||
| 2170 | last_is_meta = (XINT (last) >= 0 | 2170 | last_is_meta = (XINT (last) >= 0 |
| 2171 | && EQ (Faref (this, last), meta_prefix_char)); | 2171 | && EQ (Faref (this, last), meta_prefix_char)); |
| 2172 | 2172 | ||
| 2173 | if (nomenus && XINT (last) >= 0) | ||
| 2174 | { /* If no menu entries should be returned, skip over the | ||
| 2175 | keymaps bound to `menu-bar' and `tool-bar'. */ | ||
| 2176 | Lisp_Object tem = Faref (this, 0); | ||
| 2177 | if (EQ (tem, Qmenu_bar) || EQ (tem, Qtool_bar)) | ||
| 2178 | continue; | ||
| 2179 | } | ||
| 2180 | |||
| 2173 | QUIT; | 2181 | QUIT; |
| 2174 | 2182 | ||
| 2175 | while (CONSP (map)) | 2183 | while (CONSP (map)) |
| @@ -2328,29 +2336,7 @@ where_is_internal_1 (binding, key, definition, noindirect, keymap, this, last, | |||
| 2328 | 2336 | ||
| 2329 | /* Search through indirections unless that's not wanted. */ | 2337 | /* Search through indirections unless that's not wanted. */ |
| 2330 | if (NILP (noindirect)) | 2338 | if (NILP (noindirect)) |
| 2331 | { | 2339 | binding = get_keyelt (binding, 0); |
| 2332 | if (nomenus) | ||
| 2333 | { | ||
| 2334 | while (1) | ||
| 2335 | { | ||
| 2336 | Lisp_Object map, tem; | ||
| 2337 | /* If the contents are (KEYMAP . ELEMENT), go indirect. */ | ||
| 2338 | map = get_keymap_1 (Fcar_safe (definition), 0, 0); | ||
| 2339 | tem = Fkeymapp (map); | ||
| 2340 | if (!NILP (tem)) | ||
| 2341 | definition = access_keymap (map, Fcdr (definition), 0, 0); | ||
| 2342 | else | ||
| 2343 | break; | ||
| 2344 | } | ||
| 2345 | /* If the contents are (menu-item ...) or (STRING ...), reject. */ | ||
| 2346 | if (CONSP (definition) | ||
| 2347 | && (EQ (XCAR (definition),Qmenu_item) | ||
| 2348 | || STRINGP (XCAR (definition)))) | ||
| 2349 | return Qnil; | ||
| 2350 | } | ||
| 2351 | else | ||
| 2352 | binding = get_keyelt (binding, 0); | ||
| 2353 | } | ||
| 2354 | 2340 | ||
| 2355 | /* End this iteration if this element does not match | 2341 | /* End this iteration if this element does not match |
| 2356 | the target. */ | 2342 | the target. */ |