diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2012-04-10 12:07:23 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2012-04-10 12:07:23 +0200 |
commit | b06023500825a7dea7609931e0b82bc309bee068 (patch) | |
tree | 707107a01f7f6eef3700534eafac5c78b8b48c05 /helm-tags.el | |
parent | eba1d84cfa716fe783fe2e26a62c4eb577dc4fb8 (diff) |
Implement `match-part' attribute.
* helm.el: document match-part attribute.
* helm-tags.el: (helm-c-source-etags-select): Use match-part.
* helm.el (helm-search-match-part): New.
(helm-candidates-in-buffer,
helm-candidates-in-buffer-1,
helm-search-from-candidate-buffer): Use it.
Diffstat (limited to 'helm-tags.el')
-rw-r--r-- | helm-tags.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/helm-tags.el b/helm-tags.el index eed323b1..ee878d64 100644 --- a/helm-tags.el +++ b/helm-tags.el @@ -157,9 +157,9 @@ If not found in CURRENT-DIR search in upper directory." (with-helm-current-buffer (helm-c-etags-get-tag-file)))) -(defmacro helm-c-etags-create-buffer (file) +(defun helm-c-etags-create-buffer (file) "Create the `helm-buffer' based on contents of etags tag FILE." - `(let* ((tag-fname ,file) + (let* ((tag-fname file) max (split (with-current-buffer (find-file-noselect tag-fname) (prog1 @@ -209,6 +209,8 @@ If no entry in cache, create one." (header-name . helm-c-source-etags-header-name) (init . helm-c-etags-init) (candidates-in-buffer) + (match-part . (lambda (candidate) + (cadr (split-string candidate ":")))) (search . (helm-c-etags-search-fn)) (mode-line . helm-etags-mode-line-string) (action . helm-c-etags-default-action) |