summaryrefslogtreecommitdiff
path: root/helm-tags.el
diff options
context:
space:
mode:
authorVitalie Spinu <spinuvit@gmail.com>2013-12-28 17:35:35 -0800
committerVitalie Spinu <spinuvit@gmail.com>2013-12-28 17:42:13 -0800
commiteb5ac13dd945659fc95d21c23db7819630b15da8 (patch)
tree5f0c91b70e10fb389a34d0d6f38141e82e21c1f5 /helm-tags.el
parentb068639d11a78561cb080918fed33dd148260e26 (diff)
* helm-tags.el (helm-etags-select): clear cache of old tag files
Diffstat (limited to 'helm-tags.el')
-rw-r--r--helm-tags.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/helm-tags.el b/helm-tags.el
index a568581d..c4b0897e 100644
--- a/helm-tags.el
+++ b/helm-tags.el
@@ -286,16 +286,19 @@ This function aggregates three sources of tag files:
(str (thing-at-point 'symbol)))
(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'.")
- (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
- :default (list (concat "\\_<" str "\\_>") str)
- :buffer "*helm etags*"))))
+ (cl-loop for k being the hash-keys of helm-etags-cache
+ unless (member k tag-files)
+ do (remhash k helm-etags-cache))
+ (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
+ :default (list (concat "\\_<" str "\\_>") str)
+ :buffer "*helm etags*"))))
(provide 'helm-tags)