]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/etags.el
Add new function dom-remove-node
[gnu-emacs] / lisp / progmodes / etags.el
index 271033b15f8b1c50132a5beac699dc84c204d57f..890d55294cfdd9b82949d4deaa23c6500bab7e46 100644 (file)
@@ -2100,7 +2100,7 @@ for \\[find-tag] (which see)."
   (etags--xref-find-definitions symbol t))
 
 (defun etags--xref-find-definitions (pattern &optional regexp?)
-  ;; This emulates the behaviour of `find-tag-in-order' but instead of
+  ;; This emulates the behavior of `find-tag-in-order' but instead of
   ;; returning one match at a time all matches are returned as list.
   ;; NOTE: find-tag-tag-order is typically a buffer-local variable.
   (let* ((xrefs '())
@@ -2146,8 +2146,9 @@ for \\[find-tag] (which see)."
   (with-slots (tag-info file) l
     (let ((buffer (find-file-noselect file)))
       (with-current-buffer buffer
-        (etags-goto-tag-location tag-info)
-        (point-marker)))))
+        (save-excursion
+          (etags-goto-tag-location tag-info)
+          (point-marker))))))
 
 (cl-defmethod xref-location-line ((l xref-etags-location))
   (with-slots (tag-info) l