(completion-show-help): New defcustom.
(completion-setup-function): Heed it.
This commit is contained in:
@@ -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>
|
2006-09-04 Dan Nicolaescu <dann@ics.uci.edu>
|
||||||
|
|
||||||
* term/xterm.el (terminal-init-xterm): Add C-M- bindings.
|
* term/xterm.el (terminal-init-xterm): Add C-M- bindings.
|
||||||
|
|||||||
@@ -4984,6 +4984,12 @@ value of `completion-common-substring'. See also `display-completion-list'.")
|
|||||||
|
|
||||||
;; Variables and faces used in `completion-setup-function'.
|
;; 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
|
(defface completions-first-difference
|
||||||
'((t (:inherit bold)))
|
'((t (:inherit bold)))
|
||||||
"Face put on the first uncommon character in completions in *Completions* buffer."
|
"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)
|
(if (get-char-property element-common-end 'mouse-face)
|
||||||
(put-text-property element-common-end (1+ element-common-end)
|
(put-text-property element-common-end (1+ element-common-end)
|
||||||
'font-lock-face 'completions-first-difference))))))
|
'font-lock-face 'completions-first-difference))))))
|
||||||
;; Insert help string.
|
;; Maybe insert help string.
|
||||||
(goto-char (point-min))
|
(when completion-show-help
|
||||||
(if (display-mouse-p)
|
(goto-char (point-min))
|
||||||
(insert (substitute-command-keys
|
(if (display-mouse-p)
|
||||||
"Click \\[mouse-choose-completion] on a completion to select it.\n")))
|
(insert (substitute-command-keys
|
||||||
(insert (substitute-command-keys
|
"Click \\[mouse-choose-completion] on a completion to select it.\n")))
|
||||||
"In this buffer, type \\[choose-completion] to \
|
(insert (substitute-command-keys
|
||||||
select the completion near point.\n\n")))))
|
"In this buffer, type \\[choose-completion] to \
|
||||||
|
select the completion near point.\n\n"))))))
|
||||||
|
|
||||||
(add-hook 'completion-setup-hook 'completion-setup-function)
|
(add-hook 'completion-setup-hook 'completion-setup-function)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user