diff options
| author | Richard M. Stallman | 2005-04-10 01:45:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-04-10 01:45:58 +0000 |
| commit | 18e2d91f52853c5e62d5f34e4f4238056d31a53b (patch) | |
| tree | f802b0cf04ed13dc0369f20e66096bd95304179d /src/keymap.c | |
| parent | 3f4ae3e47488114a4ce31016ebbbf1a298d48e0f (diff) | |
| download | emacs-18e2d91f52853c5e62d5f34e4f4238056d31a53b.tar.gz emacs-18e2d91f52853c5e62d5f34e4f4238056d31a53b.zip | |
(where_is_internal): Convert a string used as event type into "(any string)".
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/keymap.c b/src/keymap.c index 10ae718ba0d..ba314301080 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -764,7 +764,9 @@ usage: (map-keymap FUNCTION KEYMAP) */) | |||
| 764 | remove that. Also remove a menu help string as second element. | 764 | remove that. Also remove a menu help string as second element. |
| 765 | 765 | ||
| 766 | If AUTOLOAD is nonzero, load autoloadable keymaps | 766 | If AUTOLOAD is nonzero, load autoloadable keymaps |
| 767 | that are referred to with indirection. */ | 767 | that are referred to with indirection. |
| 768 | |||
| 769 | This can GC because menu_item_eval_property calls Feval. */ | ||
| 768 | 770 | ||
| 769 | Lisp_Object | 771 | Lisp_Object |
| 770 | get_keyelt (object, autoload) | 772 | get_keyelt (object, autoload) |
| @@ -2554,6 +2556,19 @@ where_is_internal (definition, keymaps, firstonly, noindirect, no_remap) | |||
| 2554 | continue; | 2556 | continue; |
| 2555 | 2557 | ||
| 2556 | record_sequence: | 2558 | record_sequence: |
| 2559 | /* Don't annoy user with strings from a menu such as | ||
| 2560 | Select Paste. Change them all to "(any string)", | ||
| 2561 | so that there seems to be only one menu item | ||
| 2562 | to report. */ | ||
| 2563 | if (! NILP (sequence)) | ||
| 2564 | { | ||
| 2565 | Lisp_Object tem; | ||
| 2566 | tem = Faref (sequence, make_number (XVECTOR (sequence)->size - 1)); | ||
| 2567 | if (STRINGP (tem)) | ||
| 2568 | Faset (sequence, make_number (XVECTOR (sequence)->size - 1), | ||
| 2569 | build_string ("(any string)")); | ||
| 2570 | } | ||
| 2571 | |||
| 2557 | /* It is a true unshadowed match. Record it, unless it's already | 2572 | /* It is a true unshadowed match. Record it, unless it's already |
| 2558 | been seen (as could happen when inheriting keymaps). */ | 2573 | been seen (as could happen when inheriting keymaps). */ |
| 2559 | if (NILP (Fmember (sequence, found))) | 2574 | if (NILP (Fmember (sequence, found))) |
| @@ -2731,7 +2746,7 @@ where_is_internal_2 (args, key, binding) | |||
| 2731 | } | 2746 | } |
| 2732 | 2747 | ||
| 2733 | 2748 | ||
| 2734 | /* This function cannot GC. */ | 2749 | /* This function can GC because get_keyelt can. */ |
| 2735 | 2750 | ||
| 2736 | static Lisp_Object | 2751 | static Lisp_Object |
| 2737 | where_is_internal_1 (binding, key, definition, noindirect, this, last, | 2752 | where_is_internal_1 (binding, key, definition, noindirect, this, last, |