mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-02 08:22:22 +00:00
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.
This commit is contained in:
parent
70f83a1410
commit
471d198c92
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user