changeset 5752:412ac1a01f46

(dired-font-lock-keywords): New variable. (font-lock-set-defaults): Handle dired.el.
author Richard M. Stallman <rms@gnu.org>
date Wed, 02 Feb 1994 23:45:08 +0000
parents 59280129eaac
children eb44ecad5557
files lisp/font-lock.el
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/font-lock.el	Wed Feb 02 23:19:42 1994 +0000
+++ b/lisp/font-lock.el	Wed Feb 02 23:45:08 1994 +0000
@@ -438,6 +438,7 @@
 		  ((eq major-mode 'tex-mode)        tex-font-lock-keywords)
 		  ((eq major-mode 'texinfo-mode)    texi-font-lock-keywords)
 		  ((eq major-mode 'shell-mode)      shell-font-lock-keywords)
+		  ((eq major-mode 'dired-mode)      dired-font-lock-keywords)
 		  (t nil)))))
 
 (defconst lisp-font-lock-keywords-1
@@ -645,6 +646,17 @@
 	'("^\\[[1-9][0-9]*\\]" . font-lock-string-face))
   "Additional expressions to highlight in Shell mode.")
 
+(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.")
+
 (provide 'font-lock)
 
 ;;; font-lock.el ends here