branch: elpa/helm
commit 6f4ec95b7f8caa10074fdc4b8cdc82f65293c6f2
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    Fix error when loading helm-files.el from HFF
---
 helm-files.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/helm-files.el b/helm-files.el
index 61febfc50f..86ad78c75a 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -5600,6 +5600,12 @@ Use it for non-interactive calls of `helm-find-files'."
   "Meant to be used in `helm-resume-after-hook'.
 When NOHOOK is non-nil run inconditionally, otherwise only when
 source is `helm-source-find-files'."
+  ;; When using the action `helm-find-files-load-files' on helm-files.el,
+  ;; `helm-source-find-files' is reseted to nil hence error when calling
+  ;; `helm-set-attr' outside helm => "no buffer named *helm*".
+  (unless helm-source-find-files
+      (setq helm-source-find-files (helm-make-source
+                                    "Find Files" 'helm-source-ffiles)))
   (when (or nohook (string= "Find Files"
                             (assoc-default 'name (car sources))))
     (helm-set-attr 'resume `(lambda ()

Reply via email to