changeset 62060:9f98f54d05d7

(describe-key): No error when UNTRANSLATED is nil.
author Richard M. Stallman <rms@gnu.org>
date Wed, 04 May 2005 14:31:45 +0000
parents 1f57a1631e42
children 47b1924fe323
files lisp/help.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Wed May 04 14:22:48 2005 +0000
+++ b/lisp/help.el	Wed May 04 14:31:45 2005 +0000
@@ -611,6 +611,7 @@
 If non-nil UNTRANSLATED is a vector of the untranslated events.
 It can also be a number in which case the untranslated events from
 the last key hit are used."
+  ;; UP-EVENT is the up-event that was discarded by reading KEY, or nil.
   (interactive "kDescribe key: \np\nU")
   (if (numberp untranslated)
       (setq untranslated (this-single-command-raw-keys)))
@@ -634,7 +635,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 untranslated
+		   (stringp (aref untranslated (1- (length untranslated)))))
 	      (aset untranslated (1- (length untranslated))
 		    "(any string)"))
 	  (with-output-to-temp-buffer (help-buffer)