Commit Graph

10 Commits

Author SHA1 Message Date
Benno Schulenberg b9f472a905 syntax: texinfo: be more precise in colorizing @commands
An @command must either start at the beginning of the line and be
followed by whitespace or EOL, or it must be followed by a brace.
Colorizing just any "@text" string colored too much.
2021-10-17 12:25:01 +02:00
Benno Schulenberg badf3edc55 syntax: texinfo: colorize the special @-plus-punctuation commands too
Also, allow an @} and another @command{} within a pair of braces,
colorize only the valid @-commands with uppercase in their names,
unbold enclosed command arguments, colorize the directory entries
for the manual, and properly colorize also the comments that use
the full @comment command.

Reference:
  https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Command-List.html

Testing was done with:
  info texinfo @-C "Command List" --output=list
  sed -i -e "s/^'//" -e "s/'$//" list
  nano list -Ytexinfo
2021-10-16 17:03:45 +02:00
Benno Schulenberg 4ac932bd21 syntaxes: drop three redundant end-of-line anchors
Also fold two regexes into one, for conciseness.
2021-10-15 10:17:28 +02:00
Benno Schulenberg 9e382ba691 syntaxes: add author and license lines to four of the files
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2020-09-14 19:38:29 +02:00
Benno Schulenberg fea5d7c612 syntaxes: uniformize the initial comment 2020-04-20 19:21:56 +02:00
Benno Schulenberg 636e9ac3e8 syntaxes: remove several redundant end-of-line anchors from regexes 2018-11-03 21:12:44 +01:00
Benno Schulenberg 3e1fc6385b syntaxes: remove quotes from each syntax name, and color it differently
The different color will make the name stand out, as it should, instead
of looking the same as all the regex strings.
2018-02-14 17:36:50 +01:00
Benno Schulenberg bacb0f717d syntax: adjust the magic strings for the changes since file-5.10
Since file-5.10 (end of 2011), libmagic identifies a C file in most
cases as "C source" instead of as "C program".  Nano's magic strings
for some other files didn't match any more what file-5.32 currently
produces, either.  So, they have been adjusted, new ones added, and
old ones deleted.

This fixes https://savannah.gnu.org/bugs/?52445.
2017-11-19 11:24:30 +01:00
Benno Schulenberg fb5478338f syntax: texinfo: cover also some special cases like @U, @OE and @TeX 2017-07-14 10:29:36 +02:00
Benno Schulenberg b0ef2e2803 build: move the syntax files out of the doc/ directory
They are not documentation, they are functional elements of nano.
2016-12-30 22:05:01 +01:00