summaryrefslogtreecommitdiff
path: root/helm-source.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2017-08-21 11:32:55 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2017-08-21 11:32:55 +0200
commitfa40b6a1e253037e7852ee7682feedae07747402 (patch)
treec0f23a2fb2a70f64b491796fdfbe91cf580c101c /helm-source.el
parent20110ac6852c744f073035b10e357f7035c2734c (diff)
Use a copy of buffer for :data slot
* helm-source.el (helm--setup-source): Do it.
Diffstat (limited to 'helm-source.el')
-rw-r--r--helm-source.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/helm-source.el b/helm-source.el
index e4ba1a42..da6a804a 100644
--- a/helm-source.el
+++ b/helm-source.el
@@ -967,11 +967,12 @@ an eieio class."
cur-init))
cur-init)
(lambda ()
- (if (and (bufferp it) (buffer-live-p it))
- (helm-candidate-buffer it)
- (helm-init-candidates-in-buffer
- 'global
- (if (functionp it) (funcall it) it)))))))))
+ (helm-init-candidates-in-buffer
+ 'global
+ (cond ((functionp it) (funcall it))
+ ((and (bufferp it) (buffer-live-p it))
+ (with-current-buffer it (buffer-string)))
+ (t it)))))))))
(when (slot-value source 'fuzzy-match)
(helm-aif (slot-value source 'search)
(setf (slot-value source 'search)