diff --git a/Units/extra-file-scope-option.d/args.ctags b/Units/extra-file-scope-option.d/args.ctags new file mode 100644 index 0000000000..3b6c0f888a --- /dev/null +++ b/Units/extra-file-scope-option.d/args.ctags @@ -0,0 +1 @@ +--extra=-F diff --git a/Units/extra-file-scope-option.d/expected.tags b/Units/extra-file-scope-option.d/expected.tags new file mode 100644 index 0000000000..6932f0667a --- /dev/null +++ b/Units/extra-file-scope-option.d/expected.tags @@ -0,0 +1 @@ +y input.c /^ void y(void) {}$/;" f diff --git a/Units/extra-file-scope-option.d/input.c b/Units/extra-file-scope-option.d/input.c new file mode 100644 index 0000000000..9f9ec9b125 --- /dev/null +++ b/Units/extra-file-scope-option.d/input.c @@ -0,0 +1,2 @@ +static void x(void) {} + void y(void) {} diff --git a/ctags.1.in b/ctags.1.in index 8cdff5ee5e..e6a9fd3345 100644 --- a/ctags.1.in +++ b/ctags.1.in @@ -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. diff --git a/docs/news.rst b/docs/news.rst index cdd3213122..b93b5cacbd 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -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 --------------------------------------------------------------------- diff --git a/main/options.c b/main/options.c index eb1779d388..13b208fe92 100644 --- a/main/options.c +++ b/main/options.c @@ -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]"}, @@ -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) @@ -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",