]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/etags.el (tag-exact-file-name-match-p)
authorFrancesco Potortì <pot@gnu.org>
Tue, 12 Mar 2002 13:12:34 +0000 (13:12 +0000)
committerFrancesco Potortì <pot@gnu.org>
Tue, 12 Mar 2002 13:12:34 +0000 (13:12 +0000)
(tag-file-name-match-p, tag-partial-file-name-match-p): Assume
that the header of a tags section has either a number or nothing
after the last comma.

lisp/progmodes/etags.el

index a95285bf18cc66ce5743aabd056c7f2e68ac9abf..4bcc6135bbe22c4ce9c9027d3bbcbe68dae741f1 100644 (file)
@@ -1506,13 +1506,13 @@ where they were found."
 ;; exact file name match, i.e. searched tag must match complete file
 ;; name including directories parts if there are some.
 (defun tag-exact-file-name-match-p (tag)
-  (and (looking-at ",")
+  (and (looking-at ",[0-9]\\|\n")
        (save-excursion (backward-char (+ 2 (length tag)))
                       (looking-at "\f\n"))))
 ;; file name match as above, but searched tag must match the file
 ;; name not including the directories if there are some.
 (defun tag-file-name-match-p (tag)
-  (and (looking-at ",")
+  (and (looking-at ",[0-9]\\|\n")
        (save-excursion (backward-char (1+ (length tag)))
                       (looking-at "/"))))
 ;; this / to detect we are after a directory separator is ok for unix,
@@ -1523,7 +1523,7 @@ where they were found."
 ;; partial file name match, i.e. searched tag must match a substring
 ;; of the file name (potentially including a directory separator).
 (defun tag-partial-file-name-match-p (tag)
-  (and (looking-at ".*,")
+  (and (looking-at ".*,[0-9]\\|\n")
        (save-excursion (beginning-of-line)
                        (backward-char 2)
                       (looking-at "\f\n"))))