GNU bug report logs - #20629
25.0.50; Regression: TAGS broken, can't find anything in C++ files.

Previous Next

Package: emacs;

Reported by: "Jan D." <jan.h.d <at> swipnet.se>

Date: Fri, 22 May 2015 05:59:02 UTC

Severity: normal

Found in version 25.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 20629 <at> debbugs.gnu.org
Subject: bug#20629: 25.0.50; Regression: TAGS broken, can't find anything in C++ files.
Date: Tue, 26 May 2015 22:00:23 +0300
On 05/26/2015 06:06 PM, Eli Zaretskii wrote:

> That'd mean either some very invasive change in the insane state
> machine that runs C_entries, or, more likely, throwing it away and
> re-writing it in a very different way.  I don't volunteer.

What if we only make that change in tag-implicit-name-match-p, then? But 
the concern about false positives still applies.

> Yes, I thought about this as well.  I think this is our best bet, and
> shouldn't be too hard, as we already do similar things elsewhere.

Example?

> Patches from completion experts are welcome.

Not an expert, but this should do it. I wonder if we'll get many junk 
completions this way, in certain situations:

diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index 9ff164e..f026560 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1276,13 +1276,16 @@ buffer-local values of tags table format variables."
 \\([-a-zA-Z0-9_+*$?:]+\\)[^-a-zA-Z0-9_+*$?:\177]*\\)\177\
 \\(\\([^\n\001]+\\)\001\\)?\\([0-9]+\\)?,\\([0-9]+\\)?\n"
 	      nil t)
-	(intern	(prog1 (if (match-beginning 5)
-			   ;; There is an explicit tag name.
-			   (buffer-substring (match-beginning 5) (match-end 5))
-			 ;; No explicit tag name.  Best guess.
-			 (buffer-substring (match-beginning 3) (match-end 3)))
-		  (progress-reporter-update progress-reporter (point)))
-		table)))
+        ;; Implicit tag name.
+        (intern
+         (buffer-substring (match-beginning 3) (match-end 3))
+         table)
+        (when (match-beginning 5)
+          (intern
+           ;; There is an explicit tag name.
+           (buffer-substring (match-beginning 5) (match-end 5))
+           table))
+        (progress-reporter-update progress-reporter (point))))
     table))

 (defun etags-snarf-tag (&optional use-explicit) ; Doc string?





This bug report was last modified 9 years and 69 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.