From aa27fbb477887cb6e22a2d22e0511664d9b88d2d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 7 Feb 1995 21:00:28 +0000 Subject: [PATCH] (etags-file-of-tag): Handle file name used as tag. --- lisp/progmodes/etags.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index c0b04613ef0..e572d3361f7 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -997,9 +997,12 @@ See documentation of variable `tags-file-name'." (defun etags-file-of-tag () (save-excursion - (re-search-backward "\f\n\\([^\n]+\\),[0-9]*\n") + (if (looking-at "./") + (re-search-forward "\\([^\n]+\\),[0-9]*\n") + (re-search-backward "\f\n\\([^\n]+\\),[0-9]*\n")) (buffer-substring (match-beginning 1) (match-end 1)))) + (defun etags-tags-completion-table () (let ((table (make-vector 511 0))) (save-excursion