diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-09-13 16:41:11 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2015-09-13 16:41:11 +0200 |
commit | c224cbf79c769500edaaf1b7d3318233632b4a0c (patch) | |
tree | 7b81c76e5060993f4ff716a887d0da9e42c72613 /helm-tags.el | |
parent | 524fc7ed5396f761b2b5e6ca51380ee1899e99a2 (diff) |
Fix symbol at point to give to default arg (#1164).
* helm-tags.el (helm-etags-select): Use a raw syntax-table
to determine symbol-at-point
Diffstat (limited to 'helm-tags.el')
-rw-r--r-- | helm-tags.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/helm-tags.el b/helm-tags.el index 9f77cff2..9f03e750 100644 --- a/helm-tags.el +++ b/helm-tags.el @@ -276,10 +276,10 @@ If FILE is nil return nil." (/= last-modif (helm-etags-mtime file))))) ;;;###autoload -(defun helm-etags-select (arg) +(defun helm-etags-select (reinit) "Preconfigured helm for etags. -If called with a prefix argument or if any of the tag files have -been modified, reinitialize cache. +If called with a prefix argument REINIT +or if any of the tag files have been modified, reinitialize cache. This function aggregates three sources of tag files: @@ -294,7 +294,8 @@ This function aggregates three sources of tag files: (str (if (region-active-p) (buffer-substring-no-properties (region-beginning) (region-end)) - (thing-at-point 'symbol)))) + (with-syntax-table (standard-syntax-table) + (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'.") @@ -302,7 +303,7 @@ Create with etags shell command, or visit with `find-tag' or `visit-tags-table'. unless (member k tag-files) do (remhash k helm-etags-cache)) (mapc (lambda (f) - (when (or (equal arg '(4)) + (when (or (equal reinit '(4)) (and helm-etags-mtime-alist (helm-etags-file-modified-p f))) (remhash f helm-etags-cache))) |