;;; etags.el --- etags facility for Emacs -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2015 Free
+;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2016 Free
;; Software Foundation, Inc.
;; Author: Roland McGrath <roland@gnu.org>
interesting (it returns non-nil if so) and `tags-loop-operate' is a form to
evaluate to operate on an interesting file. If the latter evaluates to
nil, we exit; otherwise we scan the next file."
- (declare (obsolete "use `xref-find-definitions' interface instead." "25.1"))
(interactive)
(let (new
;; Non-nil means we have finished one file
(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 '())
(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
(nth 1 tag-info)))
-(defun etags-library-roots ()
- (mapcar #'file-name-directory tags-table-list))
-
\f
(provide 'etags)