diff options
author | Eli Zaretskii <eliz@gnu.org> | 2017-09-10 22:10:33 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2017-09-10 22:10:33 +0300 |
commit | 52739ffe773eb403f58a6223b7ef64175df58dd7 (patch) | |
tree | a11d4749b7e01afabd77d400cf9471e9c5172038 /lib-src | |
parent | 4b86cf5668ef70b9ee71975e5c3f5d47b08f4e37 (diff) | |
download | emacs-52739ffe773eb403f58a6223b7ef64175df58dd7.tar.gz emacs-52739ffe773eb403f58a6223b7ef64175df58dd7.tar.bz2 emacs-52739ffe773eb403f58a6223b7ef64175df58dd7.zip |
Extend --debug printouts in etags
* lib-src/etags.c (regex_tag_multiline, readline): Under
"--debug", print tags found via regexps.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/etags.c | 23 |
1 files changed, 18 insertions, 5 deletions
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); |