changeset 61522:a5836c00c2ae

(describe-key-briefly): UNTRANSLATED can be nil when called from lisp.
author Lute Kamstra <lute@gnu.org>
date Wed, 13 Apr 2005 09:16:02 +0000
parents 2f8b7bd746aa
children 0428c421c463
files lisp/help.el
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Wed Apr 13 08:55:01 2005 +0000
+++ b/lisp/help.el	Wed Apr 13 09:16:02 2005 +0000
@@ -590,7 +590,8 @@
 	;; Don't bother user with strings from (e.g.) the select-paste menu.
 	(if (stringp (aref key (1- (length key))))
 	    (aset key (1- (length key)) "(any string)"))
-	(if (stringp (aref untranslated (1- (length untranslated))))
+	(if (and (> (length untranslated) 0)
+		 (stringp (aref untranslated (1- (length untranslated)))))
 	    (aset untranslated (1- (length untranslated))
 		  "(any string)"))
 	;; Now describe the key, perhaps as changed.
@@ -603,7 +604,6 @@
 			 key-desc
 			 (if (symbolp defn) defn (prin1-to-string defn)))))))))
 
-
 (defun describe-key (key &optional untranslated up-event)
   "Display documentation of the function invoked by KEY.
 KEY should be a key sequence--when calling from a program,