aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii2017-09-10 22:10:33 +0300
committerEli Zaretskii2017-09-10 22:10:33 +0300
commit52739ffe773eb403f58a6223b7ef64175df58dd7 (patch)
treea11d4749b7e01afabd77d400cf9471e9c5172038 /lib-src
parent4b86cf5668ef70b9ee71975e5c3f5d47b08f4e37 (diff)
downloademacs-52739ffe773eb403f58a6223b7ef64175df58dd7.tar.gz
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.c23
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)
6553 else /* make a named tag */ 6553 else /* make a named tag */
6554 name = substitute (buffer, rp->name, &rp->regs); 6554 name = substitute (buffer, rp->name, &rp->regs);
6555 if (rp->force_explicit_name) 6555 if (rp->force_explicit_name)
6556 /* Force explicit tag name, if a name is there. */ 6556 {
6557 pfnote (name, true, buffer + linecharno, 6557 /* Force explicit tag name, if a name is there. */
6558 charno - linecharno + 1, lineno, linecharno); 6558 pfnote (name, true, buffer + linecharno,
6559 charno - linecharno + 1, lineno, linecharno);
6560
6561 if (debug)
6562 fprintf (stderr, "%s on %s:%d: %s\n",
6563 name ? name : "(unnamed)", curfdp->taggedfname,
6564 lineno, buffer + linecharno);
6565 }
6559 else 6566 else
6560 make_tag (name, strlen (name), true, buffer + linecharno, 6567 make_tag (name, strlen (name), true, buffer + linecharno,
6561 charno - linecharno + 1, lineno, linecharno); 6568 charno - linecharno + 1, lineno, linecharno);
@@ -6876,8 +6883,14 @@ readline (linebuffer *lbp, FILE *stream)
6876 else /* make a named tag */ 6883 else /* make a named tag */
6877 name = substitute (lbp->buffer, rp->name, &rp->regs); 6884 name = substitute (lbp->buffer, rp->name, &rp->regs);
6878 if (rp->force_explicit_name) 6885 if (rp->force_explicit_name)
6879 /* Force explicit tag name, if a name is there. */ 6886 {
6880 pfnote (name, true, lbp->buffer, match, lineno, linecharno); 6887 /* Force explicit tag name, if a name is there. */
6888 pfnote (name, true, lbp->buffer, match, lineno, linecharno);
6889 if (debug)
6890 fprintf (stderr, "%s on %s:%d: %s\n",
6891 name ? name : "(unnamed)", curfdp->taggedfname,
6892 lineno, lbp->buffer);
6893 }
6881 else 6894 else
6882 make_tag (name, strlen (name), true, 6895 make_tag (name, strlen (name), true,
6883 lbp->buffer, match, lineno, linecharno); 6896 lbp->buffer, match, lineno, linecharno);