File tree Expand file tree Collapse file tree 6 files changed +15
-0
lines changed Expand file tree Collapse file tree 6 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ run_ctags()
1313
1414run_ctags " "
1515run_ctags all
16+ run_ctags NONE
1617for c in ' !' ' "' ' $' ' %' ' &' " '" ' (' ' )' ' *' ' ,' ' -' ' .' ' /' ' :' ' ;' ' <' ' =' ' >' ' ?' ' @' ' [' ' \' ' ]' ' ^' ' `' ' |' ' ~' ; do
1718 run_ctags " C$c "
1819done
Original file line number Diff line number Diff line change 22ctags: No language specified for "langdef" option
33# all
44ctags: "all" is reserved; don't use it as the name for defining a new language
5+ # NONE
6+ ctags: "NONE" is reserved; don't use it as the name for defining a new language
57# C!
68ctags: don't use `!' in a language name (C!)
79# C"
Original file line number Diff line number Diff line change @@ -143,6 +143,8 @@ OPTIONS
143143 ``--kinds-(<LANG>|all)=[+|-](<kinds>|*) `` option in :ref: `ctags(1) <ctags(1) >` about how the
144144 reserved word is used.
145145
146+ ``NONE `` is another exception. ``NONE `` as *<name> * is not acceptable.
147+
146148 The names of built-in parsers are capitalized. When
147149 ctags evaluates an option in a command line, and
148150 chooses a parser, ctags uses the names of
Original file line number Diff line number Diff line change @@ -2263,6 +2263,12 @@ extern void processLanguageDefineOption (
22632263 eFree (name );
22642264 error (FATAL , "\"" RSV_LANG_ALL "\" is reserved; don't use it as the name for defining a new language" );
22652265 }
2266+ else if (strcmp (name , RSV_NONE ) == 0 )
2267+ {
2268+ eFree (name );
2269+ error (FATAL , "\"" RSV_NONE "\" is reserved; don't use it as the name for defining a new language" );
2270+
2271+ }
22662272 else if ((unacceptable = strpbrk (name , "!\"$%&'()*,-./:;<=>?@[\\]^`|~" )))
22672273 {
22682274 char c = * unacceptable ;
Original file line number Diff line number Diff line change @@ -143,6 +143,8 @@ OPTIONS
143143 ``--kinds-(<LANG>|all)=[+|-](<kinds>|*)`` option in ctags(1) about how the
144144 reserved word is used.
145145
146+ ``NONE`` is another exception. ``NONE`` as *<name>* is not acceptable.
147+
146148 The names of built-in parsers are capitalized. When
147149 @CTAGS_NAME_EXECUTABLE@ evaluates an option in a command line, and
148150 chooses a parser, @CTAGS_NAME_EXECUTABLE@ uses the names of
Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ my $options =
5858 if (defined $_ [0]-> {' langdef' });
5959 die " Don't use \" all\" as a language name. It is reserved word."
6060 if ($1 eq " all" );
61+ die " Don't use \" all\" as a language name. It is reserved word."
62+ if ($1 eq " NONE" );
6163
6264 $_ [0]-> {' langdef' } = $1 ;
6365 $_ [0]-> {' base' } = $5 if defined $5 ;
You can’t perform that action at this time.
0 commit comments