Commit f0f2a53b authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

Font-lock suid/guid files in Dired

* lisp/dired.el (dired-font-lock-keywords): Font-lock suid/guid
permissions (bug#8186).
(dired-sguid): New face.
parent d1963b31
Pipeline #3623 failed with stage
in 18 minutes and 25 seconds
......@@ -752,6 +752,10 @@ remapped to these, respectively.
** Dired
*** On systems that support it, Dired now font-locks the permissions
of suid/guid files specially with the 'dired-set-id' face.
*** New command 'dired-create-empty-file'.
......@@ -431,6 +431,13 @@ Subexpression 2 must end right before the \\n.")
(defvar dired-perm-write-face 'dired-perm-write
"Face name used for permissions of group- and world-writable files.")
(defface dired-set-idguid'
'((((type w32 pc)) :inherit default) ;; These default to rw-rw-rw.
(t (:inherit font-lock-warning-face)))
"Face used to highlight permissions of suid and guid files."
:group 'dired-faces
:version "27.1")
(defface dired-directory
'((t (:inherit font-lock-function-name-face)))
"Face used for subdirectories."
......@@ -499,6 +506,12 @@ Subexpression 2 must end right before the \\n.")
(list (concat dired-re-maybe-mark dired-re-inode-size
"[-d].......\\(w\\).") ; world writable
'(1 dired-perm-write-face))
(list (concat dired-re-maybe-mark dired-re-inode-size
"[-d]..\\(s\\)......") ; suid
'(1 'dired-set-id))
(list (concat dired-re-maybe-mark dired-re-inode-size
"[-d].....\\(S\\)...") ; guid
'(1 'dired-set-id))
;; Subdirectories.
(list dired-re-dir
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment