diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-27 16:25:39 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-27 16:25:45 +0200 |
commit | 471d198c92c68b8d20545f14644d2c8e9e807a5c (patch) | |
tree | 113cc6f23f06767cfbb99bbfc5f64294acf1b2ae /lisp/dired.el | |
parent | 70f83a141048c9b6fd119c1999a2113a0ab66e91 (diff) | |
download | emacs-471d198c92c68b8d20545f14644d2c8e9e807a5c.tar.gz |
Make dired fontify pipes and sockets
* lisp/dired.el (dired-socket): New face for pipes and sockets
(bug#24547).
(dired-re-socket): New regexp to match them.
(dired-font-lock-keywords): Use them.
Diffstat (limited to 'lisp/dired.el')
-rw-r--r-- | lisp/dired.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/dired.el b/lisp/dired.el index 1cd9ae50aa8..d67d92dc57d 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -340,6 +340,7 @@ The directory name must be absolute, but need not be fully expanded.") ;; DOS/Windows-style drive letters in directory names, like in "d:/foo". (defvar dired-re-dir (concat dired-re-maybe-mark dired-re-inode-size "d[^:]")) (defvar dired-re-sym (concat dired-re-maybe-mark dired-re-inode-size "l[^:]")) +(defvar dired-re-socket (concat dired-re-maybe-mark dired-re-inode-size "[sp][^:]")) (defvar dired-re-exe;; match ls permission string of an executable file (mapconcat (lambda (x) (concat dired-re-maybe-mark dired-re-inode-size x)) @@ -445,6 +446,12 @@ Subexpression 2 must end right before the \\n.") (defvar dired-symlink-face 'dired-symlink "Face name used for symbolic links.") +(defface dired-socket + '((t (:inherit font-lock-variable-name-face))) + "Face used for sockets and pipes." + :group 'dired-faces + :version "27.1") + (defface dired-ignored '((t (:inherit shadow))) "Face used for files suffixed with `completion-ignored-extensions'." @@ -500,6 +507,10 @@ Subexpression 2 must end right before the \\n.") (list dired-re-sym '(".+" (dired-move-to-filename) nil (0 dired-symlink-face))) ;; + ;; Sockets and pipes + (list dired-re-socket + '(".+" (dired-move-to-filename) nil (0 'dired-socket))) + ;; ;; Files suffixed with `completion-ignored-extensions'. '(eval . ;; It is quicker to first find just an extension, then go back to the |