comparison src/keymap.c @ 90143:146c086df160

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-37 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 241-257) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 59-65) - Update from CVS - Merge from emacs--cvs-trunk--0 - (mm-string-to-multibyte): Use Gnus trunk definition.
author Miles Bader <miles@gnu.org>
date Thu, 14 Apr 2005 05:03:52 +0000
parents 7e3f621f1dd4 d474c1024296
children f9a65d7ebd29
comparison
equal deleted inserted replaced
90142:627771f44771 90143:146c086df160
737 737
738 Also if OBJECT has a menu string as the first element, 738 Also if OBJECT has a menu string as the first element,
739 remove that. Also remove a menu help string as second element. 739 remove that. Also remove a menu help string as second element.
740 740
741 If AUTOLOAD is nonzero, load autoloadable keymaps 741 If AUTOLOAD is nonzero, load autoloadable keymaps
742 that are referred to with indirection. */ 742 that are referred to with indirection.
743
744 This can GC because menu_item_eval_property calls Feval. */
743 745
744 Lisp_Object 746 Lisp_Object
745 get_keyelt (object, autoload) 747 get_keyelt (object, autoload)
746 Lisp_Object object; 748 Lisp_Object object;
747 int autoload; 749 int autoload;
2541 means undefined. */ 2543 means undefined. */
2542 if (!EQ (shadow_lookup (keymaps, sequence, Qnil), definition)) 2544 if (!EQ (shadow_lookup (keymaps, sequence, Qnil), definition))
2543 continue; 2545 continue;
2544 2546
2545 record_sequence: 2547 record_sequence:
2548 /* Don't annoy user with strings from a menu such as
2549 Select Paste. Change them all to "(any string)",
2550 so that there seems to be only one menu item
2551 to report. */
2552 if (! NILP (sequence))
2553 {
2554 Lisp_Object tem;
2555 tem = Faref (sequence, make_number (XVECTOR (sequence)->size - 1));
2556 if (STRINGP (tem))
2557 Faset (sequence, make_number (XVECTOR (sequence)->size - 1),
2558 build_string ("(any string)"));
2559 }
2560
2546 /* It is a true unshadowed match. Record it, unless it's already 2561 /* It is a true unshadowed match. Record it, unless it's already
2547 been seen (as could happen when inheriting keymaps). */ 2562 been seen (as could happen when inheriting keymaps). */
2548 if (NILP (Fmember (sequence, found))) 2563 if (NILP (Fmember (sequence, found)))
2549 found = Fcons (sequence, found); 2564 found = Fcons (sequence, found);
2550 2565
2748 2763
2749 UNGCPRO; 2764 UNGCPRO;
2750 } 2765 }
2751 2766
2752 2767
2753 /* This function cannot GC. */ 2768 /* This function can GC because get_keyelt can. */
2754 2769
2755 static Lisp_Object 2770 static Lisp_Object
2756 where_is_internal_1 (binding, key, definition, noindirect, this, last, 2771 where_is_internal_1 (binding, key, definition, noindirect, this, last,
2757 nomenus, last_is_meta) 2772 nomenus, last_is_meta)
2758 Lisp_Object binding, key, definition, noindirect, this, last; 2773 Lisp_Object binding, key, definition, noindirect, this, last;