From: Lars Ingebrigtsen Date: Sat, 27 Jul 2019 14:25:39 +0000 (+0200) Subject: Make dired fontify pipes and sockets X-Git-Tag: emacs-27.0.90~1817^2~71 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=471d198c92c68b8d20545f14644d2c8e9e807a5c;p=emacs.git 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. --- 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