]> code.delx.au - gnu-emacs/commitdiff
(describe-prefix-bindings): New command.
authorRichard M. Stallman <rms@gnu.org>
Sun, 4 Jul 1993 18:53:24 +0000 (18:53 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 4 Jul 1993 18:53:24 +0000 (18:53 +0000)
(prefix-help-command): Set it.

lisp/help.el

index 00dcd3a04692d1a61b9acb3c4acbb3df9a1036c8..a88b14945c2129cdf92068f6b31b3c9fae4cc484 100644 (file)
@@ -159,7 +159,7 @@ If FUNCTION is nil, applies `message' to it, thus printing it."
 If optional MINOR is non-nil (or prefix argument is given if interactive),
 display documentation of active minor modes as well.
 For this to work correctly for a minor mode, the mode's indicator variable
-(listed in `minor-mode-alist') must also be a function whose documentation
+\(listed in `minor-mode-alist') must also be a function whose documentation
 describes the minor mode."
   (interactive)
   (with-output-to-temp-buffer "*Help*"
@@ -209,6 +209,18 @@ describes the minor mode."
     (search-forward "NO WARRANTY")
     (recenter 0)))
 
+(defun describe-prefix-bindings ()
+  (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)))
+(setq prefix-help-command 'describe-prefix-bindings)
+
 (defun view-emacs-news ()
   "Display info on recent changes to Emacs."
   (interactive)