summaryrefslogtreecommitdiff
path: root/helm-source.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2019-05-14 08:59:56 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2019-05-14 08:59:56 +0200
commitb4ab45fefd87d4010cda1676897ffb93ed636f95 (patch)
treeccdba15199523da6bef824931f58158e7f5d19bf /helm-source.el
parent97c86bc1653b76759b1e8493eac2ddb9ce783943 (diff)
Ensure good usage of :candidates in in-buffer sources
* helm-source.el (helm--setup-source): Add assertion.
Diffstat (limited to 'helm-source.el')
-rw-r--r--helm-source.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/helm-source.el b/helm-source.el
index 8c4d1cd0..3932f2e4 100644
--- a/helm-source.el
+++ b/helm-source.el
@@ -1026,6 +1026,10 @@ an eieio class."
'(helm-mm-3-migemo-match))))))
(defmethod helm--setup-source ((source helm-source-in-buffer))
+ (cl-assert (eq (slot-value source 'candidates) 'helm-candidates-in-buffer)
+ nil
+ (format "Wrong usage of `candidates' attr in `%s' use `data' or `init' instead"
+ (slot-value source 'name)))
(let ((cur-init (slot-value source 'init)))
(helm-aif (slot-value source 'data)
(setf (slot-value source 'init)