# HG changeset patch # User Masatake YAMATO # Date 1082105871 0 # Node ID 2ac3325ab7ec0c4d887f14ea73dc24e072901462 # Parent 2a24736eb420b23d825f6b638364746961149bb6 (completions-common-part): Rename from completion-de-emphasis. (completions-first-difference): Rename from completion-emphasis. Suggested by RMS. diff -r 2a24736eb420 -r 2ac3325ab7ec etc/NEWS --- a/etc/NEWS Fri Apr 16 08:45:40 2004 +0000 +++ b/etc/NEWS Fri Apr 16 08:57:51 2004 +0000 @@ -1604,13 +1604,19 @@ 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 -r 2a24736eb420 -r 2ac3325ab7ec lisp/ChangeLog --- a/lisp/ChangeLog Fri Apr 16 08:45:40 2004 +0000 +++ b/lisp/ChangeLog Fri Apr 16 08:57:51 2004 +0000 @@ -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 -r 2a24736eb420 -r 2ac3325ab7ec lisp/simple.el --- a/lisp/simple.el Fri Apr 16 08:45:40 2004 +0000 +++ b/lisp/simple.el Fri Apr 16 08:57:51 2004 +0000 @@ -4116,12 +4116,12 @@ ;; 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 @@ (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 @@ (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))