From ab3fdfd6343efb09e9fd6c803f586374db432a69 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 4 May 2005 14:31:45 +0000 Subject: [PATCH] (describe-key): No error when UNTRANSLATED is nil. --- lisp/help.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.2