help-gnu-emacs
[Top][All Lists]
Advanced

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

How to color full line in dired


From: Astrid Kuhr
Subject: How to color full line in dired
Date: 20 Nov 2002 13:01:31 +0100

Hello!

On emacs 19.34 I had following lines in my .emacs:

 ;;--------------------------------------------------------------------- 
 ;; font-lock fuer die ganze Zeile im dired-mode
 ;;--------------------------------------------------------------------- 
 (setq dired-font-lock-keywords
 '(
   ;; Put directory headers in italics.
   ("^  \\(/.+\\)" 1 font-lock-dired-header-face)
   ;; Put symlinks in bold italics.
   ("^\\(.*[^ ]+\\) -> [^ ]+$" . font-lock-dired-link-face)
   ;; Put marks in bold.
   ("^[^ ].*$" . font-lock-reference-face)
   ;; Put files that are subdirectories in bold.
   ("^..d.* \\([^ ]+\\)$" . font-lock-dired-dir-face)
   ;; Put Trash in green
   ("^.*~$"    . font-lock-dired-trash-face)
   ("^.*#*#$"  . font-lock-dired-trash-face)
   ("^.*\\.o$" . font-lock-dired-trash-face)
   ("^.*\\.elc$" . font-lock-dired-trash-face)
   ("^.*\\.aux$" . font-lock-dired-trash-face)
   ("^.*\\.div$" . font-lock-dired-trash-face)
   ("^.*\\.idx$" . font-lock-dired-trash-face)
   ("^.*\\.lof$" . font-lock-dired-trash-face)
   ("^.*\\.lot$" . font-lock-dired-trash-face)
   ("^.*\\.toc$" . font-lock-dired-trash-face)
   ("^.*\\.log$" . font-lock-dired-trash-face))
 )
 (defvar font-lock-face-attributes                                       
 (list
  ;;                                 
  (list 'font-lock-dired-link-face "Firebrick"        nil nil t   nil)
  (list 'font-lock-dired-trash-face "ForestGreen"     nil nil nil nil)
  (list 'font-lock-dired-header-face "tomato"         nil t   nil nil)
  (list 'font-lock-dired-dir-face "blue"              nil nil nil nil)
  )
 )

For highlighting the hole line in the dired mode, e.g. of a directory.
It works very well.

But now I change to emacs 20.5.3 and want to get the same result.
How can I define in the new emacs some additional font-lock-dired
keywords like the font-lock-dired-header-face? And how can I then
describe, which lines should be then with this color?

Regards, Astrid



reply via email to

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