summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTu Do <tu.h.do@dektech.com.au>2014-12-05 14:35:03 +0700
committerTu Do <tu.h.do@dektech.com.au>2014-12-05 14:35:03 +0700
commit59b766c480f95eb3b09a19e0f30cbcb67c122cfd (patch)
tree29c56b9772b27cc68c81d58371e55835150f1f15
parentb7cb159fedce6cd7a6f6f9452ac2293e73ebfe02 (diff)
Add fuzzy-matching for helm-semantic/imenu
-rw-r--r--helm-imenu.el20
-rw-r--r--helm-semantic.el29
2 files changed, 25 insertions, 24 deletions
diff --git a/helm-imenu.el b/helm-imenu.el
index 1f4eb577..3b517fcb 100644
--- a/helm-imenu.el
+++ b/helm-imenu.el
@@ -66,16 +66,16 @@
(defvar helm-source-imenu
- `((name . "Imenu")
- (candidates . helm-imenu-candidates)
- (allow-dups)
- (candidate-transformer . helm-imenu-transformer)
- (persistent-action . helm-imenu-persistent-action)
- (persistent-help . "Show this entry")
- (keymap . ,helm-imenu-map)
- (mode-line . helm-imenu-mode-line)
- (action . helm-imenu-action)
- "See (info \"(emacs)Imenu\")"))
+ (helm-build-sync-source "Imenu"
+ :candidates'helm-imenu-candidates
+ :fuzzy-match t
+ :candidate-transformer 'helm-imenu-transformer
+ :persistent-action 'helm-imenu-persistent-action
+ :persistent-help "Show this entry"
+ :keymap helm-imenu-map
+ :mode-line helm-imenu-mode-line
+ :action 'helm-imenu-action)
+ "See (info \"(emacs)Imenu\")")
(defun helm-imenu-action (candidate)
diff --git a/helm-semantic.el b/helm-semantic.el
index 6fa7aa3a..e7e0e325 100644
--- a/helm-semantic.el
+++ b/helm-semantic.el
@@ -109,20 +109,21 @@
(defvar helm-source-semantic
(helm-make-source "Semantic Tags" 'helm-source-sync
- :header-name "Semantic Tags"
- :init (lambda ()
- (helm-semantic--maybe-set-needs-update)
- (setq helm-semantic--tags-cache (semantic-fetch-tags))
- (with-current-buffer (helm-candidate-buffer 'global)
- (helm-semantic--fetch-candidates helm-semantic--tags-cache 0)))
- :candidates 'helm-semantic-get-candidates
- :persistent-help "Show this entry"
- :keymap 'helm-semantic-map
- :mode-line helm-semantic-mode-line
- :persistent-action (lambda (elm)
- (helm-semantic-default-action elm t)
- (helm-highlight-current-line))
- :action 'helm-semantic-default-action))
+ :header-name "Semantic Tags"
+ :init (lambda ()
+ (helm-semantic--maybe-set-needs-update)
+ (setq helm-semantic--tags-cache (semantic-fetch-tags))
+ (with-current-buffer (helm-candidate-buffer 'global)
+ (helm-semantic--fetch-candidates helm-semantic--tags-cache 0)))
+ :candidates 'helm-semantic-get-candidates
+ :fuzzy-match t
+ :persistent-help "Show this entry"
+ :keymap 'helm-semantic-map
+ :mode-line helm-semantic-mode-line
+ :persistent-action (lambda (elm)
+ (helm-semantic-default-action elm t)
+ (helm-highlight-current-line))
+ :action 'helm-semantic-default-action))
;;;###autoload
(defun helm-semantic (arg)