[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: many lines of blabber at top of *Completions* buffer
From: |
John Paul Wallington |
Subject: |
Re: many lines of blabber at top of *Completions* buffer |
Date: |
Sun, 03 Sep 2006 18:08:53 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) |
Dan Jacobson <jidanni@jidanni.org> writes:
> rms> The first two lines are needed for beginners.
> rms> You could edit the code so as to remove them.
> Edit the code? Naw, want setq completions-user-maturity 'advanced.
That's a good idea. How about this change ?
Is it too late to install this before the pretest ?
2006-09-03 John Paul Wallington <jpw@pobox.com>
* simple.el (completion-show-help): New defcustom.
(completion-setup-function): Heed it.
Index: simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.812
diff -u -r1.812 simple.el
--- simple.el 20 Aug 2006 12:16:58 -0000 1.812
+++ simple.el 3 Sep 2006 16:59:53 -0000
@@ -4982,6 +4982,12 @@
;; 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."
@@ -5068,14 +5074,15 @@
(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)
- Re: many lines of blabber at top of *Completions* buffer,
John Paul Wallington <=