[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 4b86cf5: Add --debug option to etags
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 4b86cf5: Add --debug option to etags |
Date: |
Sun, 10 Sep 2017 12:46:39 -0400 (EDT) |
branch: master
commit 4b86cf5668ef70b9ee71975e5c3f5d47b08f4e37
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Add --debug option to etags
* lib-src/etags.c (make_tag): Print found tags under --debug.
(longopts): Add --debug.
---
lib-src/etags.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 38be60e..1d0fa29 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -462,6 +462,7 @@ static bool cplusplus; /* .[hc] means C++, not
C (undocumented) */
static bool ignoreindent; /* -I: ignore indentation in C */
static int packages_only; /* --packages-only: in Ada, only tag packages*/
static int class_qualify; /* -Q: produce class-qualified tags in C++/Java
*/
+static int debug; /* --debug */
/* STDIN is defined in LynxOS system headers */
#ifdef STDIN
@@ -479,6 +480,7 @@ static struct option longopts[] =
{ "append", no_argument, NULL, 'a' },
{ "packages-only", no_argument, &packages_only, 1 },
{ "c++", no_argument, NULL, 'C' },
+ { "debug", no_argument, &debug, 1 },
{ "declarations", no_argument, &declarations, 1 },
{ "no-line-directive", no_argument, &no_line_directive, 1 },
{ "no-duplicates", no_argument, &no_duplicates, 1 },
@@ -1917,6 +1919,10 @@ make_tag (const char *name, /* tag name, or NULL if
unnamed */
bool named = (name != NULL && namelen > 0);
char *nname = NULL;
+ if (debug)
+ fprintf (stderr, "%s on %s:%d: %s\n",
+ named ? name : "(unnamed)", curfdp->taggedfname, lno, linestart);
+
if (!CTAGS && named) /* maybe set named to false */
/* Let's try to make an implicit tag name, that is, create an unnamed tag
such that etags.el can guess a name from it. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 4b86cf5: Add --debug option to etags,
Eli Zaretskii <=