From 8e8f2c4a3ce23bbb672aec275a9718ff25d4392b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Wed, 18 Jan 1995 21:57:03 +0000 Subject: [PATCH] (etags-file-of-tag): Use a regexp search to find the file name, allowing it to contain any char but a newline. --- lisp/progmodes/etags.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el index 0f93051ee69..5066514687d 100644 --- a/lisp/progmodes/etags.el +++ b/lisp/progmodes/etags.el @@ -980,10 +980,8 @@ See documentation of variable `tags-file-name'." (defun etags-file-of-tag () (save-excursion - (search-backward "\f\n") - (forward-char 2) - (buffer-substring (point) - (progn (skip-chars-forward "^,") (point))))) + (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))) -- 2.39.5