From: Roland McGrath Date: Wed, 18 Jan 1995 21:57:03 +0000 (+0000) Subject: (etags-file-of-tag): Use a regexp search to find the file name, X-Git-Tag: emacs-19.34~5400 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8e8f2c4a3ce23bbb672aec275a9718ff25d4392b;p=emacs.git (etags-file-of-tag): Use a regexp search to find the file name, allowing it to contain any char but a newline. --- 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)))