changeset 1160:f7b55bfe1c05

(get_keyelt): Skip menu help string after menu item name.
author Richard M. Stallman <rms@gnu.org>
date Fri, 18 Sep 1992 07:29:36 +0000
parents 14a07c6ffb04
children 5bfabf7de8e9
files src/keymap.c
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Thu Sep 17 21:54:44 1992 +0000
+++ b/src/keymap.c	Fri Sep 18 07:29:36 1992 +0000
@@ -269,7 +269,7 @@
    and INDEX is the object to look up in KEYMAP to yield the definition.
 
    Also if OBJECT has a menu string as the first element,
-   remove that.  */
+   remove that.  Also remove a menu help string as second element.  */
 
 Lisp_Object
 get_keyelt (object)
@@ -292,7 +292,14 @@
 	 will be used by HierarKey menus.  */
       else if (XTYPE (object) == Lisp_Cons
 	       && XTYPE (XCONS (object)->car) == Lisp_String)
-	object = XCONS (object)->cdr;
+	{
+	  object = XCONS (object)->cdr;
+	  /* Also remove a menu help string, if any,
+	     following the menu item name.  */
+	  if (XTYPE (object) == Lisp_Cons
+	      && XTYPE (XCONS (object)->car) == Lisp_String)
+	    object = XCONS (object)->cdr;
+	}
 
       else
 	/* Anything else is really the value.  */