# HG changeset patch # User Richard M. Stallman # Date 781524124 0 # Node ID ac2649a20967c1164d189fc12f4bbdc8f49a24e8 # Parent 535197b3fc42e2329d718afbbd35bb0ec1b1fd4e (dired-font-lock-keywords): New variable. (dired-mode): Set font-lock-keywords locally. diff -r 535197b3fc42 -r ac2649a20967 lisp/dired.el --- a/lisp/dired.el Fri Oct 07 10:00:00 1994 +0000 +++ b/lisp/dired.el Fri Oct 07 10:02:04 1994 +0000 @@ -110,6 +110,17 @@ "*If non-nil, Dired preserves the last-modified time in a file copy. \(This works on only some systems.)") +(defvar dired-font-lock-keywords + '(;; Put directory headers in italics. + ("^ \\(/.+\\)$" 1 font-lock-type-face) + ;; Put symlinks in bold italics. + ("\\([^ ]+\\) -> [^ ]+$" . font-lock-function-name-face) + ;; Put marks in bold. + ("^\\([^ ]\\).*$" 1 font-lock-keyword-face t) + ;; Put files that are subdirectories in bold. + ("^..d.* \\([^ ]+\\)$" 1 font-lock-keyword-face)) + "Additional expressions to highlight in Dired mode.") + ;;; Hook variables (defvar dired-load-hook nil @@ -980,6 +991,8 @@ (expand-file-name dired-directory)) (set (make-local-variable 'dired-actual-switches) (or switches dired-listing-switches)) + (make-local-variable 'font-lock-keywords) + (setq font-lock-keywords dired-font-lock-keywords) (dired-sort-other dired-actual-switches t) (run-hooks 'dired-mode-hook))