aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1995-05-24 00:46:17 +0000
committerKarl Heuer1995-05-24 00:46:17 +0000
commitccc06dcce5bb60b53583bfe3f86a7a25617a53df (patch)
tree9f36dc667d7fef278cd703c8571faf6656295868
parentc7aa5005849af7f5887b489ad899f6fa1152c6d2 (diff)
downloademacs-ccc06dcce5bb60b53583bfe3f86a7a25617a53df.tar.gz
emacs-ccc06dcce5bb60b53583bfe3f86a7a25617a53df.zip
(describe-prefix-bindings): If key is a string,
make a substring; for a vector, make a vector.
-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."
311The prefix described consists of all but the last event 311The prefix described consists of all but the last event
312of the key sequence that ran this command." 312of the key sequence that ran this command."
313 (interactive) 313 (interactive)
314 (let* ((key (this-command-keys)) 314 (let* ((key (this-command-keys)))
315 (prefix (make-vector (1- (length key)) nil)) 315 (describe-bindings
316 i) 316 (if (stringp key)
317 (setq i 0) 317 (substring key 0 (1- (length key)))
318 (while (< i (length prefix)) 318 (let ((prefix (make-vector (1- (length key)) nil))
319 (aset prefix i (aref key i)) 319 (i 0))
320 (setq i (1+ i))) 320 (while (< i (length prefix))
321 (describe-bindings prefix))) 321 (aset prefix i (aref key i))
322 (setq i (1+ i)))
323 prefix)))))
322;; Make C-h after a prefix, when not specifically bound, 324;; Make C-h after a prefix, when not specifically bound,
323;; run describe-prefix-bindings. 325;; run describe-prefix-bindings.
324(setq prefix-help-command 'describe-prefix-bindings) 326(setq prefix-help-command 'describe-prefix-bindings)