summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2005-05-04 14:31:45 +0000
committerRichard M. Stallman <rms@gnu.org>2005-05-04 14:31:45 +0000
commitab3fdfd6343efb09e9fd6c803f586374db432a69 (patch)
tree0990694caebc1f417d26186509ffb0bcd1376f79 /lisp/help.el
parentf33ae5d01acbd16a62dd86c433b7765e2be09615 (diff)
downloademacs-ab3fdfd6343efb09e9fd6c803f586374db432a69.tar.gz
(describe-key): No error when UNTRANSLATED is nil.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el4
1 files changed, 3 insertions, 1 deletions
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)