diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2014-12-04 08:50:32 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2014-12-04 08:50:32 +0100 |
commit | f2cc3191ba14708c7863e8206497a8b099b3c8dd (patch) | |
tree | 24a662a22789053b224050e4324c9c373d2ee3b8 /helm-elisp.el | |
parent | d1098e58d365269a88b23bba4d677ca211923ff6 (diff) |
* helm-elisp.el (helm-locate-library): Enable fuzzy matching.
(helm-locate-library-class): new class.
Diffstat (limited to 'helm-elisp.el')
-rw-r--r-- | helm-elisp.el | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/helm-elisp.el b/helm-elisp.el index e4429971..27e29c2e 100644 --- a/helm-elisp.el +++ b/helm-elisp.el @@ -563,18 +563,10 @@ First call indent, second complete symbol, third complete fname." ;;; Locate elisp library ;; ;; -(defvar helm-source-locate-library - `((name . "Elisp libraries (Scan)") - (init . (helm-locate-library-scan-init)) - (candidates-in-buffer) - (candidate-number-limit . 9999) - (keymap . ,helm-generic-files-map) - (type . file))) - -(defun helm-locate-library-scan-init () - "Init helm buffer status." - (helm-init-candidates-in-buffer - 'global (helm-locate-library-scan-list))) +(defclass helm-locate-library-class (helm-source-in-buffer helm-type-file) + ((data :initform (lambda () (helm-locate-library-scan-list))) + (fuzzy-match :initform t) + (keymap :initform helm-generic-files-map))) (defun helm-locate-library-scan-list () (cl-loop for dir in load-path @@ -587,7 +579,8 @@ First call indent, second complete symbol, third complete fname." ;;;###autoload (defun helm-locate-library () (interactive) - (helm :sources 'helm-source-locate-library + (helm :sources (helm-make-source "Elisp libraries (Scan)" + 'helm-locate-library-class) :buffer "*helm locate library*")) (defun helm-set-variable (var) |