summaryrefslogtreecommitdiff
path: root/helm-dabbrev.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2014-11-28 11:36:32 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2014-11-28 11:36:32 +0100
commit49c3d257eb0da23f14bee24b8d4e87837c6e9a99 (patch)
tree5a831a8adbebb8d28da74319d162f23060580cb1 /helm-dabbrev.el
parent1ab4d9bff8a8e42d3016419f37d8134f1d04a179 (diff)
Build some sources with helm-build-in-buffer-source.
* helm-dabbrev.el (helm-dabbrev): Do it. (helm-source-dabbrev): Removed. * helm-elisp.el (helm-lisp-completion-at-point): Same.
Diffstat (limited to 'helm-dabbrev.el')
-rw-r--r--helm-dabbrev.el18
1 files changed, 6 insertions, 12 deletions
diff --git a/helm-dabbrev.el b/helm-dabbrev.el
index 8092dc83..414248f6 100644
--- a/helm-dabbrev.el
+++ b/helm-dabbrev.el
@@ -220,17 +220,6 @@ but the initial search for all candidates in buffer(s)."
(append lst (funcall dabbrev-get abbrev 'all-bufs)))
lst))))
-(defvar helm-source-dabbrev
- `((name . "Dabbrev Expand")
- (init . (lambda ()
- (helm-init-candidates-in-buffer 'global
- helm-dabbrev--cache)))
- (candidates-in-buffer)
- (persistent-action . (lambda (_candidate) (ignore)))
- (persistent-help . "DoNothing")
- (keymap . ,helm-dabbrev-map)
- (action . helm-dabbrev-default-action)))
-
(defun helm-dabbrev-default-action (candidate)
(with-helm-current-buffer
(let* ((limits (helm-bounds-of-thing-before-point
@@ -304,7 +293,12 @@ but the initial search for all candidates in buffer(s)."
(setq helm-dabbrev--data nil)
(insert dabbrev))
(with-helm-show-completion (car limits) (cdr limits)
- (helm :sources 'helm-source-dabbrev
+ (helm :sources (helm-build-in-buffer-source "Dabbrev Expand"
+ :data helm-dabbrev--cache
+ :persistent-action 'ignore
+ :persistent-help "DoNothing"
+ :keymap helm-dabbrev-map
+ :action 'helm-dabbrev-default-action)
:buffer "*helm dabbrev*"
:input (concat "^" dabbrev " ")
:resume 'noresume