Skip to content

Commit 708f318

Browse files
committed
Merge pull request #64 from joddie/fix/etags-moves-point
Fix/etags moves point
2 parents c2d7bc4 + bdf3709 commit 708f318

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

drupal/etags.el

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@
4747
"Get function arguments from etags TAGS."
4848
(when (and (boundp 'drupal/etags-rootdir)
4949
(file-exists-p (concat drupal/etags-rootdir "TAGS")))
50-
(with-current-buffer (find-tag-noselect symbol nil nil)
51-
(goto-char (point-min))
52-
(when (re-search-forward
53-
(format "function\\s-+%s\\s-*(\\([^{]*\\))" symbol)
54-
nil t)
55-
(match-string-no-properties 1)))))
50+
(save-excursion
51+
(with-current-buffer (find-tag-noselect symbol nil nil)
52+
(goto-char (point-min))
53+
(when (re-search-forward
54+
(format "function\\s-+%s\\s-*(\\([^{]*\\))" symbol)
55+
nil t)
56+
(match-string-no-properties 1))))))
5657

5758
(add-hook 'drupal-mode-hook #'drupal/etags-enable)
5859

0 commit comments

Comments
 (0)