aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConstantine Vetoshev <gepardcv@gmail.com>2021-08-20 19:59:20 -0700
committerConstantine Vetoshev <gepardcv@gmail.com>2021-08-20 19:59:20 -0700
commit1c257f35ccabaa807d3a79f6daed7b6a5872d27b (patch)
tree357c94516d9deeb25781b0a64bcbd434c0183836
parentc7a421e0ac26d81a7d1afe06825eb53c1fae0cd2 (diff)
Fix Helm integration loading order bug.
-rw-r--r--perspective.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/perspective.el b/perspective.el
index 113a6b9..ec62bec 100644
--- a/perspective.el
+++ b/perspective.el
@@ -1404,7 +1404,16 @@ PERSP-SET-IDO-BUFFERS)."
(defun persp--helm-activate (&rest _args)
(defvar helm-source-buffers-list)
+ (declare-function helm-make-source "helm-source.el")
(declare-function helm-add-action-to-source "helm.el")
+ ;; XXX: Ugly Helm initialization, works around the way
+ ;; helm-source-buffers-list is lazily initialized in helm-buffers.el
+ ;; helm-buffers-list and helm-mini (copypasta code).
+ (require 'helm-buffers)
+ (unless helm-source-buffers-list
+ (setq helm-source-buffers-list
+ (helm-make-source "Buffers" 'helm-source-buffers)))
+ ;; actually activate things
(advice-add 'helm-buffer-list-1 :filter-return #'persp--helm-buffer-list-filter)
(helm-add-action-to-source
"Perspective: Add buffer to current perspective"