changeset 54910:2ac3325ab7ec

(completions-common-part): Rename from completion-de-emphasis. (completions-first-difference): Rename from completion-emphasis. Suggested by RMS.
author Masatake YAMATO <jet@gyve.org>
date Fri, 16 Apr 2004 08:57:51 +0000
parents 2a24736eb420
children 40b3b405fe21
files etc/NEWS lisp/ChangeLog lisp/simple.el
diffstat 3 files changed, 21 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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'.
--- 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 <juri@jurta.org> 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  <lektu@terra.es>
 
--- 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))