diff src/keymap.c @ 83286:9deb6323655c

Merged from miles@gnu.org--gnu-2005 (patch 59, 240-245) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-240 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-241 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-242 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-243 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-244 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-245 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-59 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-326
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 11 Apr 2005 12:40:15 +0000
parents 9684495d72bc d474c1024296
children 13371344a3ba
line wrap: on
line diff
--- a/src/keymap.c	Fri Apr 08 16:25:22 2005 +0000
+++ b/src/keymap.c	Mon Apr 11 12:40:15 2005 +0000
@@ -765,7 +765,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)
@@ -2555,6 +2557,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)))
@@ -2732,7 +2747,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,