From ccc06dcce5bb60b53583bfe3f86a7a25617a53df Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Wed, 24 May 1995 00:46:17 +0000 Subject: [PATCH] (describe-prefix-bindings): If key is a string, make a substring; for a vector, make a vector. --- lisp/help.el | 18 ++++++++++-------- 1 file 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) -- 2.39.2