1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00

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.
This commit is contained in:
Lars Ingebrigtsen 2019-10-14 03:31:33 +02:00
parent d1963b312d
commit f0f2a53b27
2 changed files with 17 additions and 0 deletions

View File

@ -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'.

View 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