diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/simple.el | 23 |
2 files changed, 20 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bcc02cc2ae4..16ffce4ef52 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-09-04 John Paul Wallington <jpw@pobox.com> | ||
| 2 | |||
| 3 | * simple.el (completion-show-help): New defcustom. | ||
| 4 | (completion-setup-function): Heed it. | ||
| 5 | |||
| 1 | 2006-09-04 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2006-09-04 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | * term/xterm.el (terminal-init-xterm): Add C-M- bindings. | 8 | * 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'.") | |||
| 4984 | 4984 | ||
| 4985 | ;; Variables and faces used in `completion-setup-function'. | 4985 | ;; Variables and faces used in `completion-setup-function'. |
| 4986 | 4986 | ||
| 4987 | (defcustom completion-show-help t | ||
| 4988 | "Non-nil means show help message in *Completions* buffer." | ||
| 4989 | :type 'boolean | ||
| 4990 | :version "22.1" | ||
| 4991 | :group 'completion) | ||
| 4992 | |||
| 4987 | (defface completions-first-difference | 4993 | (defface completions-first-difference |
| 4988 | '((t (:inherit bold))) | 4994 | '((t (:inherit bold))) |
| 4989 | "Face put on the first uncommon character in completions in *Completions* buffer." | 4995 | "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.)") | |||
| 5070 | (if (get-char-property element-common-end 'mouse-face) | 5076 | (if (get-char-property element-common-end 'mouse-face) |
| 5071 | (put-text-property element-common-end (1+ element-common-end) | 5077 | (put-text-property element-common-end (1+ element-common-end) |
| 5072 | 'font-lock-face 'completions-first-difference)))))) | 5078 | 'font-lock-face 'completions-first-difference)))))) |
| 5073 | ;; Insert help string. | 5079 | ;; Maybe insert help string. |
| 5074 | (goto-char (point-min)) | 5080 | (when completion-show-help |
| 5075 | (if (display-mouse-p) | 5081 | (goto-char (point-min)) |
| 5076 | (insert (substitute-command-keys | 5082 | (if (display-mouse-p) |
| 5077 | "Click \\[mouse-choose-completion] on a completion to select it.\n"))) | 5083 | (insert (substitute-command-keys |
| 5078 | (insert (substitute-command-keys | 5084 | "Click \\[mouse-choose-completion] on a completion to select it.\n"))) |
| 5079 | "In this buffer, type \\[choose-completion] to \ | 5085 | (insert (substitute-command-keys |
| 5080 | select the completion near point.\n\n"))))) | 5086 | "In this buffer, type \\[choose-completion] to \ |
| 5087 | select the completion near point.\n\n")))))) | ||
| 5081 | 5088 | ||
| 5082 | (add-hook 'completion-setup-hook 'completion-setup-function) | 5089 | (add-hook 'completion-setup-hook 'completion-setup-function) |
| 5083 | 5090 | ||