emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 52739ff: Extend --debug printouts in etags


From: Eli Zaretskii
Subject: [Emacs-diffs] master 52739ff: Extend --debug printouts in etags
Date: Sun, 10 Sep 2017 15:12:32 -0400 (EDT)

branch: master
commit 52739ffe773eb403f58a6223b7ef64175df58dd7
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Extend --debug printouts in etags
    
    * lib-src/etags.c (regex_tag_multiline, readline): Under
    "--debug", print tags found via regexps.
---
 lib-src/etags.c | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/lib-src/etags.c b/lib-src/etags.c
index 1d0fa29..df51c0b 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -6553,9 +6553,16 @@ regex_tag_multiline (void)
              else /* make a named tag */
                name = substitute (buffer, rp->name, &rp->regs);
              if (rp->force_explicit_name)
-               /* Force explicit tag name, if a name is there. */
-               pfnote (name, true, buffer + linecharno,
-                       charno - linecharno + 1, lineno, linecharno);
+               {
+                 /* Force explicit tag name, if a name is there. */
+                 pfnote (name, true, buffer + linecharno,
+                         charno - linecharno + 1, lineno, linecharno);
+
+                 if (debug)
+                   fprintf (stderr, "%s on %s:%d: %s\n",
+                            name ? name : "(unnamed)", curfdp->taggedfname,
+                            lineno, buffer + linecharno);
+               }
              else
                make_tag (name, strlen (name), true, buffer + linecharno,
                          charno - linecharno + 1, lineno, linecharno);
@@ -6876,8 +6883,14 @@ readline (linebuffer *lbp, FILE *stream)
              else /* make a named tag */
                name = substitute (lbp->buffer, rp->name, &rp->regs);
              if (rp->force_explicit_name)
-               /* Force explicit tag name, if a name is there. */
-               pfnote (name, true, lbp->buffer, match, lineno, linecharno);
+               {
+                 /* Force explicit tag name, if a name is there. */
+                 pfnote (name, true, lbp->buffer, match, lineno, linecharno);
+                 if (debug)
+                   fprintf (stderr, "%s on %s:%d: %s\n",
+                            name ? name : "(unnamed)", curfdp->taggedfname,
+                            lineno, lbp->buffer);
+               }
              else
                make_tag (name, strlen (name), true,
                          lbp->buffer, match, lineno, linecharno);



reply via email to

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