summaryrefslogtreecommitdiff
path: root/helm-tags.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2013-12-28 08:13:45 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2013-12-28 08:13:45 +0100
commit28fc7bc7a1728c02adb0ec2beb0404956c1d843c (patch)
treec4c24b0f708949408374f7dfd9120f0118200036 /helm-tags.el
parent4894b9666e087510cf9bae04f4ac7f704bdf841c (diff)
* helm-tags.el (helm-etags-all-tag-files): Remove unused directory arg.
(helm-source-etags-select): Use mapc.
Diffstat (limited to 'helm-tags.el')
-rw-r--r--helm-tags.el33
1 files changed, 15 insertions, 18 deletions
diff --git a/helm-tags.el b/helm-tags.el
index fa05f157..667fe491 100644
--- a/helm-tags.el
+++ b/helm-tags.el
@@ -124,12 +124,11 @@ Lookes recursively in parents directorys for a
(when current-dir
(expand-file-name helm-etags-tag-file-name current-dir))))
-(defun helm-etags-all-tag-files (&optional directory)
+(defun helm-etags-all-tag-files ()
"Return files from the following sources;
1) An automatically located file in the parent directories, by `helm-etags-get-tag-file'.
2) `tags-file-name', which is commonly set by `find-tag' command.
- 3) `tags-table-list' which is commonly set by `visit-tags-table' command.
-"
+ 3) `tags-table-list' which is commonly set by `visit-tags-table' command."
(delete-dups
(delq nil
(append (list (helm-etags-get-tag-file)
@@ -279,26 +278,24 @@ This function aggregates three sources of tag files:
1) An automatically located file in the parent directories, by `helm-etags-get-tag-file'.
2) `tags-file-name', which is commonly set by `find-tag' command.
- 3) `tags-table-list' which is commonly set by `visit-tags-table' command.
-"
+ 3) `tags-table-list' which is commonly set by `visit-tags-table' command."
(interactive "P")
(let ((tag-files (helm-etags-all-tag-files))
(helm-execute-action-at-once-if-one helm-etags-execute-action-at-once-if-one))
(if (cl-notany 'file-exists-p tag-files)
(message "Error: No tag file found. Create with etags shell command, or visit with `find-tag' or `visit-tags-table'.")
- (cl-mapc (lambda (f)
- (when (or (equal arg '(4))
- (and helm-etags-mtime-alist
- (helm-etags-file-modified-p f)))
- (remhash f helm-etags-cache)))
- tag-files)
- (helm :sources 'helm-source-etags-select
- :keymap helm-etags-map
- ;; fixme: can we first display using \\_<foo\\_> but insert foo on M-n?
- ;; :default (concat "\\_<" (thing-at-point 'symbol) "\\_>")
- :default (thing-at-point 'symbol)
- :buffer "*helm etags*")
- )))
+ (mapc (lambda (f)
+ (when (or (equal arg '(4))
+ (and helm-etags-mtime-alist
+ (helm-etags-file-modified-p f)))
+ (remhash f helm-etags-cache)))
+ tag-files)
+ (helm :sources 'helm-source-etags-select
+ :keymap helm-etags-map
+ ;; fixme: can we first display using \\_<foo\\_> but insert foo on M-n?
+ ;; :default (concat "\\_<" (thing-at-point 'symbol) "\\_>")
+ :default (thing-at-point 'symbol)
+ :buffer "*helm etags*"))))
(provide 'helm-tags)