From: Masatake YAMATO Date: Fri, 16 Apr 2004 08:57:51 +0000 (+0000) Subject: (completions-common-part): Rename from completion-de-emphasis. X-Git-Tag: ttn-vms-21-2-B4~6800 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6a4940b235bf20a374992406b8b5052b186e51cc;p=emacs.git (completions-common-part): Rename from completion-de-emphasis. (completions-first-difference): Rename from completion-emphasis. Suggested by RMS. --- diff --git a/etc/NEWS b/etc/NEWS index 6e8a5766e33..e7b2355b222 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1604,13 +1604,19 @@ candidate is a directory. to the text before point. If there is text in the buffer after point, it remains unchanged. -** Visual feedback of *Completions* buffer is enhanced. -Faces are put on the common prefix substrings and the first uncommon -charachters of each completion candidate in the *Completions* buffer. -`completion-de-emphasis' is put on the common prefix substrings as the -face; and `completion-emphasis' is put on the first uncommon -charachters. By default `completion-de-emphasis' is inherited from -`default' face. `completion-emphasis' is inherited from `bold' face. +** Enhanced visual feedback in *Completions* buffer. + +Completions lists use faces to highlight what all completions +have in common and where they begin to differ. + +The common prefix shared by all possible completions uses the face +`completions-common-part', while the first character that isn't the +same uses the face `completions-first-difference'. By default, +`completions-common-part' inherits from `default', and +`completions-first-difference' inherits from `bold'. The idea of +`completions-common-part' is that you can use it to make the common +parts less visible than normal, so that the rest of the differing +parts is, by contrast, slightly highlighted. +++ ** New user option `inhibit-startup-buffer-menu'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 49a4c09050c..407c9db5a40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,6 +5,9 @@ to `element-common-end' at the end of loop. The bug is reported by Juri Linkov in emacs-devel list. + (completions-common-part): Rename from completion-de-emphasis. + (completions-first-difference): Rename from completion-emphasis. + Suggested by RMS. 2004-04-16 Juanma Barranquero diff --git a/lisp/simple.el b/lisp/simple.el index f894529e120..6287090312c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -4116,12 +4116,12 @@ The completion list buffer is available as the value of `standard-output'.") ;; This function goes in completion-setup-hook, so that it is called ;; after the text of the completion list buffer is written. -(defface completion-emphasis +(defface completions-first-difference '((t (:inherit bold))) "Face put on the first uncommon character in completions in *Completions* buffer." :group 'completion) -(defface completion-de-emphasis +(defface completions-common-part '((t (:inherit default))) "Face put on the common prefix substring in completions in *Completions* buffer." :group 'completion) @@ -4154,7 +4154,7 @@ The completion list buffer is available as the value of `standard-output'.") (save-match-data (if (minibufferp mainbuf) (setq completion-base-size 0)))) - ;; Put emphasis and de-emphasis faces on completions. + ;; Put faces on first uncommon characters and common parts. (when completion-base-size (let* ((common-string-length (length (substring mbuf-contents @@ -4168,9 +4168,9 @@ The completion list buffer is available as the value of `standard-output'.") (when (and (get-char-property element-start 'mouse-face) (get-char-property element-common-end 'mouse-face)) (put-text-property element-start element-common-end - 'font-lock-face 'completion-de-emphasis) + 'font-lock-face 'completions-common-part) (put-text-property element-common-end (1+ element-common-end) - 'font-lock-face 'completion-emphasis)) + 'font-lock-face 'completions-first-difference)) (setq element-start (next-single-property-change element-start 'mouse-face))