[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm 49c43fefa5: Prefer icons for mode for buffers
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm 49c43fefa5: Prefer icons for mode for buffers |
Date: |
Wed, 2 Nov 2022 08:58:51 -0400 (EDT) |
branch: elpa/helm
commit 49c43fefa59ec1127d4f0f3ad50696bc07d52985
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Prefer icons for mode for buffers
---
helm-buffers.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/helm-buffers.el b/helm-buffers.el
index 43c9c73a53..0f1252c42b 100644
--- a/helm-buffers.el
+++ b/helm-buffers.el
@@ -32,6 +32,7 @@
(declare-function all-the-icons-icon-for-file "ext:all-the-icons.el")
(declare-function all-the-icons-octicon "ext:all-the-icons.el")
+(defvar all-the-icons-mode-icon-alist)
(defvar dired-buffers)
(defvar org-directory)
(defvar helm-ff-default-directory)
@@ -418,12 +419,15 @@ The list is reordered with `helm-buffer-list-reorder-fn'."
(list
(let* ((buf-fname (buffer-file-name (get-buffer buf-name)))
(ext (if buf-fname (helm-file-name-extension buf-fname) ""))
+ (bmode (with-current-buffer buf-name major-mode))
(icon (when helm-buffers-show-icons
- (cond ((eq type 'dired)
- (all-the-icons-octicon "file-directory"))
- (buf-fname
- (all-the-icons-icon-for-file buf-fname))
- (t (all-the-icons-octicon "star")))))
+ (helm-aif (assq bmode all-the-icons-mode-icon-alist)
+ (apply (cadr it) (cddr it))
+ (cond ((eq type 'dired)
+ (all-the-icons-octicon "file-directory"))
+ (buf-fname
+ (all-the-icons-icon-for-file buf-fname))
+ (t (all-the-icons-octicon "star"))))))
(buf-name (propertize buf-name 'face face1
'help-echo help-echo
'type type)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/helm 49c43fefa5: Prefer icons for mode for buffers,
ELPA Syncer <=