branch: elpa/helm commit 1182b4a8e0d9999e0426d6f9a0c3cd04036fcc64 Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Use helm-x-icons-resolve-alist in buffers --- helm-buffers.el | 4 +--- helm-x-icons.el | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/helm-buffers.el b/helm-buffers.el index be8657de5a..cd58415962 100644 --- a/helm-buffers.el +++ b/helm-buffers.el @@ -459,9 +459,7 @@ The list is reordered with `helm-buffer-list-reorder-fn'." (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-alist (if (eq helm-x-icons-provider 'all-the-icons) - all-the-icons-mode-icon-alist - nerd-icons-mode-icon-alist)) + (icon-alist (helm-x-icons-resolve-alist 'mode)) (icon (when helm-buffers-show-icons (helm-aif (assq bmode icon-alist) (and helm-x-icons-provider diff --git a/helm-x-icons.el b/helm-x-icons.el index e881ee8cb8..05a214b2e5 100644 --- a/helm-x-icons.el +++ b/helm-x-icons.el @@ -33,7 +33,7 @@ The currently supported providers are `all-the-icons' and `nerd-icons'." (defun helm-x-icons-match-to-alist (file type) "Match FILE against an entry in ALIST using `string-match-p'. -Supported TYPE are ext, regexp, url and dir." +Supported TYPE are ext, regexp, mode, url and dir." (cl-loop with alist = (helm-x-icons-resolve-alist type) for (elm . rest) in alist for target = (if (eq type 'url) file (helm-basename file)) @@ -48,7 +48,8 @@ The returned alist is computed according to `helm-x-icons-provider'." (ext "extension-icon-alist") (regexp "regexp-icon-alist") (dir "dir-icon-alist") - (url "url-alist")))) + (url "url-alist") + (mode "mode-icon-alist")))) (symbol-value (intern-soft (concat provider-name "-" alist-name)))))