]> git.eshelyaron.com Git - emacs.git/commitdiff
(completion-show-help): New defcustom.
authorJohn Paul Wallington <jpw@pobox.com>
Mon, 4 Sep 2006 18:26:03 +0000 (18:26 +0000)
committerJohn Paul Wallington <jpw@pobox.com>
Mon, 4 Sep 2006 18:26:03 +0000 (18:26 +0000)
(completion-setup-function): Heed it.

lisp/ChangeLog
lisp/simple.el

index bcc02cc2ae42ffe00fbc0bbda026cd37ab102287..16ffce4ef52b548bb45a73a7c6ad69718e4be7c9 100644 (file)
@@ -1,3 +1,8 @@
+2006-09-04  John Paul Wallington  <jpw@pobox.com>
+
+       * simple.el (completion-show-help): New defcustom.
+       (completion-setup-function): Heed it.
+
 2006-09-04  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * term/xterm.el (terminal-init-xterm): Add C-M- bindings.
index 956468070da3000f47ddf433b745d3f8479d8770..fbc110fbb2936bc8103cca7725293216c93902fb 100644 (file)
@@ -4984,6 +4984,12 @@ value of `completion-common-substring'. See also `display-completion-list'.")
 
 ;; Variables and faces used in `completion-setup-function'.
 
+(defcustom completion-show-help t
+  "Non-nil means show help message in *Completions* buffer."
+  :type 'boolean
+  :version "22.1"
+  :group 'completion)
+
 (defface completions-first-difference
   '((t (:inherit bold)))
   "Face put on the first uncommon character in completions in *Completions* buffer."
@@ -5070,14 +5076,15 @@ of the minibuffer before point is always the common substring.)")
              (if (get-char-property element-common-end 'mouse-face)
                  (put-text-property element-common-end (1+ element-common-end)
                                     'font-lock-face 'completions-first-difference))))))
-      ;; Insert help string.
-      (goto-char (point-min))
-      (if (display-mouse-p)
-         (insert (substitute-command-keys
-                  "Click \\[mouse-choose-completion] on a completion to select it.\n")))
-      (insert (substitute-command-keys
-              "In this buffer, type \\[choose-completion] to \
-select the completion near point.\n\n")))))
+      ;; Maybe insert help string.
+      (when completion-show-help
+       (goto-char (point-min))
+       (if (display-mouse-p)
+           (insert (substitute-command-keys
+                    "Click \\[mouse-choose-completion] on a completion to select it.\n")))
+       (insert (substitute-command-keys
+                "In this buffer, type \\[choose-completion] to \
+select the completion near point.\n\n"))))))
 
 (add-hook 'completion-setup-hook 'completion-setup-function)