From: Lars Ingebrigtsen Date: Sun, 28 Jul 2019 10:00:24 +0000 (+0200) Subject: Mark block/char devices the same as sockets in dired X-Git-Tag: emacs-27.0.90~1817^2~59 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=65274ab1c96fbd4bbd6303dc6c6567f1cd2470bc;p=emacs.git Mark block/char devices the same as sockets in dired * lisp/dired.el (dired-re-socket): Also mark block and char devices with the socket face (bug#24547). --- diff --git a/etc/NEWS b/etc/NEWS index d876c95e68c..e79a6ec9974 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -651,6 +651,10 @@ remapped to these, respectively. *** The marking commands now report how many files were marked by the command itself, not how many files are marked in total. +--- +*** A new face, `dired-socket', is used to highlight sockets, names +pipes, block devices and character devices. + ** Find-Dired *** New customizable variable 'find-dired-refine-function'. diff --git a/lisp/dired.el b/lisp/dired.el index d67d92dc57d..738d5fc111a 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -340,7 +340,8 @@ 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-socket (concat dired-re-maybe-mark dired-re-inode-size + "[bcsp][^:]")) (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)) @@ -448,7 +449,7 @@ Subexpression 2 must end right before the \\n.") (defface dired-socket '((t (:inherit font-lock-variable-name-face))) - "Face used for sockets and pipes." + "Face used for sockets, pipes, block devices and char devices." :group 'dired-faces :version "27.1") @@ -507,7 +508,7 @@ Subexpression 2 must end right before the \\n.") (list dired-re-sym '(".+" (dired-move-to-filename) nil (0 dired-symlink-face))) ;; - ;; Sockets and pipes + ;; Sockets, pipes, block devices, char devices. (list dired-re-socket '(".+" (dired-move-to-filename) nil (0 'dired-socket))) ;;