mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
(describe-prefix-bindings): If key is a string,
make a substring; for a vector, make a vector.
This commit is contained in:
parent
c7aa500584
commit
ccc06dcce5
1 changed files with 10 additions and 8 deletions
18
lisp/help.el
18
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue