diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2019-05-14 08:59:56 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2019-05-14 08:59:56 +0200 |
commit | b4ab45fefd87d4010cda1676897ffb93ed636f95 (patch) | |
tree | ccdba15199523da6bef824931f58158e7f5d19bf /helm-source.el | |
parent | 97c86bc1653b76759b1e8493eac2ddb9ce783943 (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.el | 4 |
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) |