# HG changeset patch # User Francesco Potort # Date 1024567963 0 # Node ID d10f7a8678bc6bff058cb28321695cdb71c8ff6c # Parent e475ce899bf16790faff5f6af9cec3d84c3a4848 Rearranged the order in which the tag-*-match-p functions are defined, for clarity purposes. No code change. diff -r e475ce899bf1 -r d10f7a8678bc lisp/progmodes/etags.el --- a/lisp/progmodes/etags.el Thu Jun 20 10:05:11 2002 +0000 +++ b/lisp/progmodes/etags.el Thu Jun 20 10:12:43 2002 +0000 @@ -1461,7 +1461,7 @@ (lambda () (zerop (buffer-size)))))) ;; Match qualifier functions for tagnames. -;; XXX these functions assume etags file format. +;; These functions assume the etags file format defined in etc/ETAGS.EBNF. ;; This might be a neat idea, but it's too hairy at the moment. ;;(defmacro tags-with-syntax (&rest body) @@ -1479,6 +1479,23 @@ ;; (set-syntax-table otable)))) ;;(put 'tags-with-syntax 'edebug-form-spec '(&rest form)) +;; 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 ",[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 ",[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, +;; is there a variable that contains the regexp for directory separator +;; on whatever operating system ? +;; Looks like ms-win will lose here :). + ;; t if point is at a tag line that matches TAG exactly. ;; point should be just after a string that matches TAG. (defun tag-exact-match-p (tag) @@ -1503,23 +1520,6 @@ (save-excursion (backward-char (length tag)) (looking-at "\\b")))) -;; 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 ",[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 ",[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, -;; is there a variable that contains the regexp for directory separator -;; on whatever operating system ? -;; Looks like ms-win will lose here :). - ;; 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)