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

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

[nongnu] elpa/helm 2cd0c2f236 1/3: Fail safe with helm-ff-icon-mode (#26


From: ELPA Syncer
Subject: [nongnu] elpa/helm 2cd0c2f236 1/3: Fail safe with helm-ff-icon-mode (#2605)
Date: Tue, 4 Jul 2023 03:59:58 -0400 (EDT)

branch: elpa/helm
commit 2cd0c2f236e13378cfd9684eb34dc02e86982a88
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Fail safe with helm-ff-icon-mode (#2605)
---
 helm-files.el | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/helm-files.el b/helm-files.el
index 3cff97ef66..b485ebe7c6 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -849,9 +849,8 @@ present in this list."
   :initialize 'custom-initialize-changed
   :set (lambda (var val)
          (set var val)
-         (setq helm-source-find-files nil)
-         (when helm-ff-icon-mode
-           (helm-ff-icon-mode 1))))
+         ;; Force rebuilding the source to remove the highlight match FCT.
+         (setq helm-source-find-files nil)))
 
 (defcustom helm-ff-edit-marked-files-fn (if (< emacs-major-version 29)
                                             #'helm-ff-wfnames
@@ -4284,14 +4283,13 @@ Arg DISP is the display part of the candidate."
 
 ;;;###autoload
 (define-minor-mode helm-ff-icon-mode
-    "Display icons from `all-the-icons' package in HFF when enabled.
-
-NOTE: This mode is building `helm-source-find-files', so if you enable
-it from your init file, ensure to call it _after_ your defmethod's
-`helm-setup-user-source' definitions (if some) to ensure they are called."
+    "Display icons from `all-the-icons' package in HFF when enabled."
   :global t
   :group 'helm-files
-  (require 'all-the-icons)
+  (when helm-ff-icon-mode
+    (unless (require 'all-the-icons nil t)
+      (setq helm-ff-icon-mode nil)
+      (user-error "All The Icons package is not installed")))
   (clrhash helm-ff--list-directory-cache))
 
 (defun helm-find-files-action-transformer (actions candidate)
@@ -5350,8 +5348,6 @@ When no suitable place to drop is found ask to drop to
 
 Use it for non-interactive calls of `helm-find-files'."
   (require 'tramp)
-  (unless (featurep 'all-the-icons)
-    (helm-ff-icon-mode -1))
   ;; Resolve FNAME now outside of helm.
   ;; [FIXME] When `helm-find-files-1' is used directly from lisp
   ;; and FNAME is an abbreviated path, for some reasons



reply via email to

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