emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emphasize the character to be typed next in *Completions*


From: Juri Linkov
Subject: Re: Emphasize the character to be typed next in *Completions*
Date: Thu, 25 Mar 2004 23:31:19 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

David Kastrup <address@hidden> writes:
> Juri Linkov <address@hidden> writes:
>> >    I also implemented a version which highlights the common perfix string
>> >    in completions. And I felt that the visual feedback is too strong.
>> >
>> > I agree.  To emphasize the part that is not informative is not a
>> > useful feature.
>> 
>> To emphasize the non-informative part is not useful, but a different
>> face could be used to *de-emphasize* it.  (Even if emphasizing the
>> word "de-emphasize" looks paradoxical, it's appropriate here :-)
>> For example, if the default foreground color is black, displaying
>> the common prefix string in gray will make it more unnoticeable.
>
> file-name-shadow-mode does something like this, so one could take the
> faces from there.

It makes sense to use `file-name-shadow' face to de-emphasize files
with ignored extensions in dired buffers.

Index: emacs/lisp/dired.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/dired.el,v
retrieving revision 1.276
diff -c -r1.276 dired.el
*** emacs/lisp/dired.el 25 Mar 2004 10:40:59 -0000      1.276
--- emacs/lisp/dired.el 25 Mar 2004 21:10:00 -0000
***************
*** 334,340 ****
       ;; It is quicker to first find just an extension, then go back to the
       ;; start of that file name.  So we do this complex MATCH-ANCHORED form.
       (list (concat "\\(" (regexp-opt completion-ignored-extensions) 
"\\|#\\)$")
!          '(".+" (dired-move-to-filename) nil (0 font-lock-string-face)))))
    "Additional expressions to highlight in Dired mode.")
  
  ;;; Macros must be defined before they are used, for the byte compiler.
--- 345,351 ----
       ;; It is quicker to first find just an extension, then go back to the
       ;; start of that file name.  So we do this complex MATCH-ANCHORED form.
       (list (concat "\\(" (regexp-opt completion-ignored-extensions) 
"\\|#\\)$")
!          '(".+" (dired-move-to-filename) nil (0 'file-name-shadow)))))
    "Additional expressions to highlight in Dired mode.")
  
  ;;; Macros must be defined before they are used, for the byte compiler.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]