summaryrefslogtreecommitdiff
path: root/helm-lib.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2018-03-18 10:03:22 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2018-03-18 11:25:21 +0100
commite497b2c6d0d0e1d3a041b7de110e087b02976592 (patch)
treec38212bbeaf4c4fe962bd9ce6c34b70915a96fd0 /helm-lib.el
parent4154fd45d8f990c063455ddf208b3b5ec93bd6be (diff)
Make helm-sources local and get rid of helm-compiled-sources
* helm.el (helm-get-sources): Get rid of helm-compiled-sources, now helm-sources are computed as a list of alist at startup. (helm-get-current-source): Use helm-sources local value. (helm-funcall-foreach): Same. (helm-internal): No need to reset global value of helm-sources as it is not anymore global. (helm-initialize): Setup helm-sources as list directly here and make it local. (helm--run-init-hooks): Use arg sources passed from initial-setup. (helm-initial-setup): Use new arg sources. (helm-update): Use helm-sources local value. (helm-force-update): Same. (helm-redisplay-buffer): Same. Use helm-sources instead of helm-get-sources
Diffstat (limited to 'helm-lib.el')
-rw-r--r--helm-lib.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/helm-lib.el b/helm-lib.el
index fe82dd6d..9d476930 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -745,15 +745,14 @@ ARGS is (cand1 cand2 ...) or ((disp1 . real1) (disp2 . real2) ...)
(defun helm-source-by-name (name &optional sources)
"Get a Helm source in SOURCES by NAME.
-Optional argument SOURCES is a list of Helm sources. The default
-value is computed with `helm-get-sources' which is faster
-than specifying SOURCES because sources are cached."
+Optional argument SOURCES is a list of Helm sources which default to
+`helm-sources'."
(cl-loop with src-list = (if sources
(cl-loop for src in sources
collect (if (listp src)
src
(symbol-value src)))
- (helm-get-sources))
+ helm-sources)
for source in src-list
thereis (and (string= name (assoc-default 'name source)) source)))