Mercurial > emacs
changeset 61421:d474c1024296
(where_is_internal): Convert a string used as event type into "(any string)".
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 10 Apr 2005 01:43:18 +0000 |
parents | 132c9732a8f0 |
children | 6b6f4fcc8035 |
files | src/keymap.c |
diffstat | 1 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keymap.c Sun Apr 10 00:54:14 2005 +0000 +++ b/src/keymap.c Sun Apr 10 01:43:18 2005 +0000 @@ -764,7 +764,9 @@ remove that. Also remove a menu help string as second element. If AUTOLOAD is nonzero, load autoloadable keymaps - that are referred to with indirection. */ + that are referred to with indirection. + + This can GC because menu_item_eval_property calls Feval. */ Lisp_Object get_keyelt (object, autoload) @@ -2554,6 +2556,19 @@ continue; record_sequence: + /* Don't annoy user with strings from a menu such as + Select Paste. Change them all to "(any string)", + so that there seems to be only one menu item + to report. */ + if (! NILP (sequence)) + { + Lisp_Object tem; + tem = Faref (sequence, make_number (XVECTOR (sequence)->size - 1)); + if (STRINGP (tem)) + Faset (sequence, make_number (XVECTOR (sequence)->size - 1), + build_string ("(any string)")); + } + /* It is a true unshadowed match. Record it, unless it's already been seen (as could happen when inheriting keymaps). */ if (NILP (Fmember (sequence, found))) @@ -2731,7 +2746,7 @@ } -/* This function cannot GC. */ +/* This function can GC because get_keyelt can. */ static Lisp_Object where_is_internal_1 (binding, key, definition, noindirect, this, last,