diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-01-04 09:02:03 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-01-04 09:02:03 +0100 |
commit | e48cfa6b7fa81f497e46759432b8c3bd6f987689 (patch) | |
tree | b371c4815ecad46183ece853098cb93e58eaeeb0 /helm-tags.el | |
parent | eda54ed75d18cf22f58a29b39135bfa3fdd6c0db (diff) |
Add face to filenames in etags (#758).
* helm-tags.el (helm-etags-file): New face.
(helm-etags-create-buffer): Use it.
(helm-tags-faces): new group.
(helm-source-etags-select): Use get-line.
Diffstat (limited to 'helm-tags.el')
-rw-r--r-- | helm-tags.el | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/helm-tags.el b/helm-tags.el index 06d51dac..14069774 100644 --- a/helm-tags.el +++ b/helm-tags.el @@ -49,6 +49,20 @@ one match." :type 'boolean :group 'helm-tags) + +(defgroup helm-tags-faces nil + "Customize the appearance of helm-tags faces." + :prefix "helm-" + :group 'helm-tags + :group 'helm-faces) + +(defface helm-etags-file + '((t (:foreground "Lightgoldenrod4" + :underline t))) + "Face used to highlight etags filenames." + :group 'helm-tags-faces) + + (defun helm-etags-run-switch-other-window () "Run switch to other window action from `helm-source-etags-select'." (interactive) @@ -200,7 +214,8 @@ If not found in CURRENT-DIR search in upper directory." (substring i 0 it) i)) do (cond ((and elm (string-match "^\\([^,]+\\),[0-9]+$" elm)) - (setq fname (match-string 1 elm))) + (setq fname (propertize (match-string 1 elm) + 'face 'helm-etags-file))) (elm (setq cand (concat fname ": " elm))) (t (setq cand nil))) when cand do (progn @@ -239,6 +254,7 @@ If no entry in cache, create one." (header-name . helm-etags-get-header-name) (init . helm-etags-init) (candidates-in-buffer) + (get-line . buffer-substring) (match-part . (lambda (candidate) ;; Match only the tag part of CANDIDATE ;; and not the filename. |