emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/etags.el


From: Francesco Potortì
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/etags.el
Date: Thu, 20 Jun 2002 07:27:01 -0400

Index: emacs/lisp/progmodes/etags.el
diff -c emacs/lisp/progmodes/etags.el:1.167 emacs/lisp/progmodes/etags.el:1.168
*** emacs/lisp/progmodes/etags.el:1.167 Thu Jun 20 06:12:43 2002
--- emacs/lisp/progmodes/etags.el       Thu Jun 20 07:27:01 2002
***************
*** 1196,1201 ****
--- 1196,1202 ----
               (find-tag-tag-order . (tag-exact-file-name-match-p
                                        tag-file-name-match-p
                                      tag-exact-match-p
+                                     tag-implicit-name-match-p
                                      tag-symbol-match-p
                                      tag-word-match-p
                                      tag-partial-file-name-match-p
***************
*** 1504,1509 ****
--- 1505,1521 ----
           (eq (char-after (- (point) (length tag) 1)) ?\177))
        ;; We are not on the explicit tag name, but perhaps it follows.
        (looking-at (concat "[^\177\n]*\177" (regexp-quote tag) "\001"))))
+ 
+ ;; t if point is at a tag line that has an implicit name.
+ ;; point should be just after a string that matches TAG.
+ (defun tag-implicit-name-match-p (tag)
+   ;; Look at the comment of the make_tag function in lib-src/etags.c for
+   ;; a textual description of the four rules.
+   (and (string-match "^[^ \t()=,;]+$" tag) ;rule #1
+        (looking-at "[ \t()=,;]?\177") ;rules #2 and #4
+        (save-excursion
+        (backward-char (1+ (length tag)))
+        (looking-at "[\n \t()=,;]")))) ;rule #3
  
  ;; t if point is at a tag line that matches TAG as a symbol.
  ;; point should be just after a string that matches TAG.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]