Commit ccc06dcc authored by Karl Heuer's avatar Karl Heuer
Browse files

(describe-prefix-bindings): If key is a string,

make a substring; for a vector, make a vector.
parent c7aa5005
......@@ -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."
(let* ((key (this-command-keys))
(prefix (make-vector (1- (length key)) nil))
(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)))
(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)))
;; Make C-h after a prefix, when not specifically bound,
;; run describe-prefix-bindings.
(setq prefix-help-command 'describe-prefix-bindings)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment