Skip to content

Commit

Permalink
main: introduce --extra=+F as an alias of --file-scope=yes
Browse files Browse the repository at this point in the history
'F' letter for --extra option was reserved in
source code of exuberant ctags but it was disabled
with '#if 0/endif'.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
  • Loading branch information
masatake committed Nov 10, 2015
1 parent 16686cb commit 2913427
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions Units/extra-file-scope-option.d/args.ctags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--extra=-F
1 change: 1 addition & 0 deletions Units/extra-file-scope-option.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
y input.c /^ void y(void) {}$/;" f
2 changes: 2 additions & 0 deletions Units/extra-file-scope-option.d/input.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
static void x(void) {}
void y(void) {}
4 changes: 4 additions & 0 deletions ctags.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ flags replace any current settings. The meaning of each flag is as follows:
.PP
.RS 8
.TP 4
.I F
Equivalent to \fB\-\-file\-scope\fP.
This option is on by default.
.TP 4
.I f
Include an entry for the base file name of every source file (e.g.
"example.c"), which addresses the first line of the file.
Expand Down
7 changes: 7 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@ On windows mingw32, you must specify ``WITH_ICONV=yes`` like below::

C:\dev\ctags>mingw32-make -f mk_mingw.mak WITH_ICONV=yes

Extra tag entries (``--extra``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``F``

Equivalent to --file-scope.

Changes in tags file format
---------------------------------------------------------------------

Expand Down
6 changes: 1 addition & 5 deletions main/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static optionDescription LongOptionDescription [] = {
{0," Uses the specified type of EX command to locate tags [mix]."},
#endif
{1," --extra=[+|-]flags"},
{1," Include extra tag entries for selected information (flags: \"fq.\")."},
{1," Include extra tag entries for selected information (flags: \"Ffq.\") [F]."},
{1," --fields=[+|-]flags"},
{1," Include selected extension fields (flags: \"afmikKlnsStzZ\") [fks]."},
{1," --file-scope=[yes|no]"},
Expand Down Expand Up @@ -1032,9 +1032,7 @@ static void processExtraTagsOption (
{
inc->fileNames = FALSE;
inc->qualifiedTags = FALSE;
#if 0
inc->fileScope = FALSE;
#endif
inc->fileNamesWithTotalLines = FALSE;
}
while ((c = *p++) != '\0') switch (c)
Expand All @@ -1044,9 +1042,7 @@ static void processExtraTagsOption (

case 'f': inc->fileNames = mode; break;
case 'q': inc->qualifiedTags = mode; break;
#if 0
case 'F': inc->fileScope = mode; break;
#endif
case '.': inc->fileNamesWithTotalLines = mode; break;

default: error(WARNING, "Unsupported parameter '%c' for \"%s\" option",
Expand Down

0 comments on commit 2913427

Please sign in to comment.