From: Eli Zaretskii Date: Sun, 10 Sep 2017 19:10:33 +0000 (+0300) Subject: Extend --debug printouts in etags X-Git-Tag: emacs-26.0.90~201 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=52739ffe773eb403f58a6223b7ef64175df58dd7;p=emacs.git Extend --debug printouts in etags * lib-src/etags.c (regex_tag_multiline, readline): Under "--debug", print tags found via regexps. --- diff --git a/lib-src/etags.c b/lib-src/etags.c index 1d0fa292079..df51c0b4f82 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);