From: John Paul Wallington Date: Mon, 4 Sep 2006 18:26:03 +0000 (+0000) Subject: (completion-show-help): New defcustom. X-Git-Tag: emacs-pretest-22.0.90~764 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d0fd091694de37bde79b704d90dbefd26f7989f9;p=emacs.git (completion-show-help): New defcustom. (completion-setup-function): Heed it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bcc02cc2ae4..16ffce4ef52 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-09-04 John Paul Wallington + + * simple.el (completion-show-help): New defcustom. + (completion-setup-function): Heed it. + 2006-09-04 Dan Nicolaescu * term/xterm.el (terminal-init-xterm): Add C-M- bindings. diff --git a/lisp/simple.el b/lisp/simple.el index 956468070da..fbc110fbb29 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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)