branch: elpa/drupal-mode
commit 708f318b126cf7ea67a3242aa0744916d48b3fca
Merge: c2d7bc42e3 bdf3709e10
Author: Arne Jørgensen <[email protected]>
Commit: Arne Jørgensen <[email protected]>
Merge pull request #64 from joddie/fix/etags-moves-point
Fix/etags moves point
---
drupal/etags.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drupal/etags.el b/drupal/etags.el
index 6c23a7e216..d502b4596c 100644
--- a/drupal/etags.el
+++ b/drupal/etags.el
@@ -47,12 +47,13 @@
"Get function arguments from etags TAGS."
(when (and (boundp 'drupal/etags-rootdir)
(file-exists-p (concat drupal/etags-rootdir "TAGS")))
- (with-current-buffer (find-tag-noselect symbol nil nil)
- (goto-char (point-min))
- (when (re-search-forward
- (format "function\\s-+%s\\s-*(\\([^{]*\\))" symbol)
- nil t)
- (match-string-no-properties 1)))))
+ (save-excursion
+ (with-current-buffer (find-tag-noselect symbol nil nil)
+ (goto-char (point-min))
+ (when (re-search-forward
+ (format "function\\s-+%s\\s-*(\\([^{]*\\))" symbol)
+ nil t)
+ (match-string-no-properties 1))))))
(add-hook 'drupal-mode-hook #'drupal/etags-enable)