diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2018-03-18 14:01:45 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2018-03-18 14:04:45 +0100 |
commit | 6c4ccb36e7b85013baafdbf33b9d18dc429e8be8 (patch) | |
tree | d261b00907abb8bedbb9d481cabb78689f64fc6f /helm.el | |
parent | 8427b7349aa796b8cf11813861e77f5daccb17b2 (diff) |
Be sure SOURCES are computed in helm-funcall-foreach
* helm.el (helm-funcall-foreach): Do it.
(helm-get-sources): Not really needed but check existence of sources.
Diffstat (limited to 'helm.el')
-rw-r--r-- | helm.el | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1991,7 +1991,8 @@ Return the result of last function call." (defun helm-funcall-foreach (sym &optional sources) "Call the associated function(s) to SYM for each source if any." - (let ((sources (or sources helm-sources))) + (let ((sources (or (helm-get-sources sources) + helm-sources))) (cl-dolist (source sources) (helm-aif (assoc-default sym source) (helm-funcall-with-source source it))))) @@ -2856,11 +2857,12 @@ Note that this feature is available only with emacs-25+." ;; (defun helm-get-sources (sources) "Transform each element of SOURCES in alist. -Returns the resulting list" - (mapcar (lambda (source) - (if (listp source) - source (symbol-value source))) - (helm-normalize-sources sources))) +Returns the resulting list." + (when sources + (mapcar (lambda (source) + (if (listp source) + source (symbol-value source))) + (helm-normalize-sources sources)))) (defun helm-initialize (any-resume any-input any-default any-sources) "Start initialization of `helm' session. |