diff options
| author | Richard M. Stallman <rms@gnu.org> | 1994-02-02 23:45:08 +0000 |
|---|---|---|
| committer | Richard M. Stallman <rms@gnu.org> | 1994-02-02 23:45:08 +0000 |
| commit | 8023777cb1a5308172f1461950194e9f8afc63a9 (patch) | |
| tree | a8f35f295bc541ed5a8b61215c8d81007b92c088 | |
| parent | 2eca79d6aea6ca7bb836966bffdcb22fa7d4a78d (diff) | |
| download | emacs-8023777cb1a5308172f1461950194e9f8afc63a9.tar.gz | |
(dired-font-lock-keywords): New variable.
(font-lock-set-defaults): Handle dired.el.
| -rw-r--r-- | lisp/font-lock.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 70570223ef4..bef515b1239 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -438,6 +438,7 @@ This can take a while for large buffers." ((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 @@ This does a lot more highlighting.") '("^\\[[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 |
