From: Richard M. Stallman Date: Wed, 4 May 2005 14:31:45 +0000 (+0000) Subject: (describe-key): No error when UNTRANSLATED is nil. X-Git-Tag: ttn-vms-21-2-B4~544 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ab3fdfd6343efb09e9fd6c803f586374db432a69;p=emacs.git (describe-key): No error when UNTRANSLATED is nil. --- diff --git a/lisp/help.el b/lisp/help.el index e65982623c1..76fc43d63ef 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -611,6 +611,7 @@ pass a string or a vector. 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 @@ the last key hit are used." ;; 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)