changeset 11890:543a76aa50b9

(describe-prefix-bindings): If key is a string, make a substring; for a vector, make a vector.
author Karl Heuer <kwzh@gnu.org>
date Wed, 24 May 1995 00:46:17 +0000
parents 1067ddd12dfc
children 937c7fced6ee
files lisp/help.el
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Wed May 24 00:43:27 1995 +0000
+++ b/lisp/help.el	Wed May 24 00:46:17 1995 +0000
@@ -311,14 +311,16 @@
 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)