aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>1993-08-01 22:22:48 +0000
committerRoland McGrath <[email protected]>1993-08-01 22:22:48 +0000
commiteb6a920f2059fb26982495e1dcf1f04dc51ed594 (patch)
treedad8f4f318b3b96b369c88cd3655131697d01521 /lisp/progmodes
parentcc6d6e586dfe8aff9771ab75c2d214cb3335933c (diff)
(etags-tags-completion-table): Fixed regexp for today's format.
(etags-snarf-tag): Skip explicit tag name if present.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/etags.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index d053fb079c..6fc6f899e4 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -918,18 +918,17 @@ See documentation of variable `tags-file-name'."
;; \1 is the string to match;
;; \2 is not interesting;
;; \3 is the guessed tag name; XXX guess should be better eg DEFUN
- ;; \4 is the char to start searching at;
- ;; \5 is the line to start searching at;
- ;; \6 is not interesting;
- ;; \7 is the explicitly-specified tag name.
+ ;; \4 is not interesting;
+ ;; \5 is the explicitly-specified tag name.
+ ;; \6 is the line to start searching at;
+ ;; \7 is the char to start searching at.
(while (re-search-forward
"^\\(\\(.+[^-a-zA-Z0-9_$]+\\)?\\([-a-zA-Z0-9_$]+\\)\
-\[^-a-zA-Z0-9_$]*\\)\177\
-\\([0-9]+\\),\\([0-9]+\\)\\(,\001\\([^\n]+\\)\\)?\n"
+\[^-a-zA-Z0-9_$]*\\)\177\\(\\([^\n\001]+\\)\001\\)?\\([0-9]+\\),\\([0-9]+\\)\n"
nil t)
- (intern (if (match-beginning 6)
+ (intern (if (match-beginning 5)
;; There is an explicit tag name.
- (buffer-substring (match-beginning 6) (match-end 6))
+ (buffer-substring (match-beginning 5) (match-end 5))
;; No explicit tag name. Best guess.
(buffer-substring (match-beginning 3) (match-end 3)))
table)))
@@ -941,6 +940,8 @@ See documentation of variable `tags-file-name'."
(setq tag-text (buffer-substring (1- (point))
(save-excursion (beginning-of-line)
(point))))
+ ;; Skip explicit tag name if present.
+ (search-forward "\001" (save-excursion (forward-line 1) (point)) t)
(search-forward ",")
(setq startpos (string-to-int (buffer-substring
(point)