diff options
| author | Karl Heuer | 1995-05-24 00:46:17 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-05-24 00:46:17 +0000 |
| commit | ccc06dcce5bb60b53583bfe3f86a7a25617a53df (patch) | |
| tree | 9f36dc667d7fef278cd703c8571faf6656295868 | |
| parent | c7aa5005849af7f5887b489ad899f6fa1152c6d2 (diff) | |
| download | emacs-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.el | 18 |
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." | |||
| 311 | The prefix described consists of all but the last event | 311 | The prefix described consists of all but the last event |
| 312 | of the key sequence that ran this command." | 312 | of 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) |