summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1995-05-24 00:46:17 +0000
committerKarl Heuer <kwzh@gnu.org>1995-05-24 00:46:17 +0000
commitbe039e8b7f47b8ecaa355bc43a03313677cf25ff (patch)
treedde56b18c8b95548029a2fbaf5b08133741e480c /lisp/help.el
parentbe0837a1d301dc42b969dc3ae5993cd5a41046b6 (diff)
downloademacs-be039e8b7f47b8ecaa355bc43a03313677cf25ff.tar.gz
(describe-prefix-bindings): If key is a string,
make a substring; for a vector, make a vector.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el18
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/help.el b/lisp/help.el
index fb4b01e5aee..296975f66f3 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -311,14 +311,16 @@ describes the minor mode."
The prefix described consists of all but the last event
of the key sequence that ran this command."
(interactive)
- (let* ((key (this-command-keys))
- (prefix (make-vector (1- (length key)) nil))
- i)
- (setq i 0)
- (while (< i (length prefix))
- (aset prefix i (aref key i))
- (setq i (1+ i)))
- (describe-bindings prefix)))
+ (let* ((key (this-command-keys)))
+ (describe-bindings
+ (if (stringp key)
+ (substring key 0 (1- (length key)))
+ (let ((prefix (make-vector (1- (length key)) nil))
+ (i 0))
+ (while (< i (length prefix))
+ (aset prefix i (aref key i))
+ (setq i (1+ i)))
+ prefix)))))
;; Make C-h after a prefix, when not specifically bound,
;; run describe-prefix-bindings.
(setq prefix-help-command 'describe-prefix-bindings)