emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/wfnames a820f2f899 51/98: Add faces for dir and symlinks a


From: ELPA Syncer
Subject: [nongnu] elpa/wfnames a820f2f899 51/98: Add faces for dir and symlinks and use them
Date: Tue, 8 Aug 2023 04:01:26 -0400 (EDT)

branch: elpa/wfnames
commit a820f2f899af66aab05b9e3d14676149b7bacd37
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Add faces for dir and symlinks and use them
---
 wfnames.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/wfnames.el b/wfnames.el
index 891a62a78f..5406e8870d 100644
--- a/wfnames.el
+++ b/wfnames.el
@@ -58,6 +58,12 @@
 
 (defface wfnames-files '((t :foreground "RoyalBlue"))
   "Face used to display filenames in wfnames buffer.")
+
+(defface wfnames-dir '((t :background "White" :foreground "red"))
+  "Face used to display directories in wfnames buffer.")
+
+(defface wfnames-symlink '((t :foreground "Orange"))
+  "Face used to display symlinks in wfnames buffer.")
 
 (defvar wfnames-mode-map
   (let ((map (make-sparse-keymap)))
@@ -112,8 +118,11 @@ Special commands:
   (with-current-buffer (get-buffer-create wfnames-buffer)
     (save-excursion
       (cl-loop for file in files
+               for face = (cond ((file-directory-p file) 'wfnames-dir)
+                                ((file-symlink-p file) 'wfnames-symlink)
+                                (t 'wfnames-files))
                do (insert (propertize
-                           file 'old-name file 'face 'wfnames-files)
+                           file 'old-name file 'face face)
                           "\n")))
     ;; Go to beginning of basename on first line.
     (while (re-search-forward "/" (point-at-eol) t))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]