From 2478f9c98e9c890a90b1b829ace19fff55ef3aa8 Mon Sep 17 00:00:00 2001 From: zufuliu Date: Wed, 6 Mar 2024 18:39:06 +0800 Subject: [PATCH] Update Texinfo command list to Texinfo 7.1. --- readme.md | 4 ++-- src/EditLexers/stlTexinfo.c | 19 ++++++++++--------- tools/Misc.py | 6 ++++-- tools/lang/Texinfo.texi | 14 +++++++++++--- tools/lang/TypeScript.ts | 2 +- 5 files changed, 28 insertions(+), 17 deletions(-) diff --git a/readme.md b/readme.md index 7a543365ed..e960dfa88a 100644 --- a/readme.md +++ b/readme.md @@ -133,9 +133,9 @@ Latest development builds (artifacts in Release configuration for each compiler * [Oracle](tools/lang/Oracle.sql), Oracle 20, incomplete. * [Swift](tools/lang/Swift.swift), up to Swift 5.10. * TCL, [Screenshots](https://github.com/zufuliu/notepad2/wiki/Screenshots#tcl) - * [Texinfo](tools/lang/Texinfo.texi), up to Texinfo 7.0. + * [Texinfo](tools/lang/Texinfo.texi), up to Texinfo 7.1. * [TOML File](https://toml.io/) - * [TypeScript](tools/lang/TypeScript.ts), TypeScript 5.2. + * [TypeScript](tools/lang/TypeScript.ts), up to TypeScript 5.4. * Visual Basic, VB6, VB.NET * VBScript * [VHDL](tools/lang/VHDL.vhdl), up to VHDL 2019. diff --git a/src/EditLexers/stlTexinfo.c b/src/EditLexers/stlTexinfo.c index 1a6fcbca1c..c0c649cc4a 100644 --- a/src/EditLexers/stlTexinfo.c +++ b/src/EditLexers/stlTexinfo.c @@ -8,10 +8,10 @@ static KEYWORDLIST Keywords_TEXI = {{ "appendix appendixsec appendixsection appendixsubsec appendixsubsubsec arrow asis atchar author " "b backslashchar bsixpaper bullet bye " "c caption center centerchap chapheading chapter cindex cite clear click clicksequence clickstyle " -"code codequotebacktick codequoteundirected columnfractions comma command comment contents copyright " -"defcodeindex defcvx deffnx defindex definfoenclose defivarx defmacx defmethodx defop defopt defoptx defopx " -"defspec defspecx deftpx deftypecvx deftypefnnewline deftypefnx deftypefunx deftypeivarx deftypemethod deftypemethodx " -"deftypeop deftypeopx deftypevarx deftypevrx defunx defvarx defvrx dfn dh dircategory dmn " +"code codequotebacktick codequoteundirected comma command comment contents copyright " +"defcodeindex defcvx deffnx defindex definfoenclose defivarx defline defmacx defmethodx defop defopt defoptx defopx " +"defspec defspecx deftpx deftypecvx deftypefnnewline deftypefnx deftypefunx deftypeivarx deftypeline " +"deftypemethod deftypemethodx deftypeop deftypeopx deftypevarx deftypevrx defunx defvarx defvrx dfn dh dircategory dmn " "documentencoding documentlanguage dotaccent dotless dots " "email emph end enddots env equiv error errormsg euro " "evenfooting evenfootingmarks evenheading evenheadingmarks everyfooting everyfootingmarks everyheading everyheadingmarks " @@ -21,8 +21,9 @@ static KEYWORDLIST Keywords_TEXI = {{ "hashchar heading headings headitem headitemfont hyphenation " "i image include indent indicateurl inforef inlinefmt inlinefmtifelse inlineifclear inlineifset inlineraw insertcopying " "item itemx " -"kbd kbdinputstyle key kindex l lbracechar leq listoffloats lowersections majorheading math microtype minus " -"need node noindent novalidate o oddfooting oddfootingmarks oddheading oddheadingmarks oe ogonek option ordf ordm " +"kbd kbdinputstyle key kindex l lbracechar leq linemacro link listoffloats lowersections " +"majorheading math microtype minus need node nodedescription noindent novalidate " +"o oddfooting oddfootingmarks oddheading oddheadingmarks oe ogonek option ordf ordm " "page pagesizes paragraphindent part pindex point pounds print printindex pxref " "questiondown quotedblbase quotedblleft quotedblright quoteleft quoteright quotesinglbase " "r raisesections rbracechar ref registeredsymbol result ringaccent " @@ -37,13 +38,13 @@ static KEYWORDLIST Keywords_TEXI = {{ , // 1 block command "cartouche copying " -"defcv deffn defivar defmac defmethod deftp deftypecv deftypefn deftypefun deftypeivar deftypevar deftypevr defun " -"defvar defvr detailmenu direntry display displaymath docbook documentdescription " +"defblock defcv deffn defivar defmac defmethod deftp deftypecv deftypefn deftypefun deftypeivar deftypevar deftypevr " +"defun defvar defvr detailmenu direntry display displaymath docbook documentdescription " "enumerate example float flushleft flushright format ftable group html " "ifclear ifcommanddefined ifcommandnotdefined ifdocbook ifhtml ifinfo iflatex " "ifnotdocbook ifnothtml ifnotinfo ifnotlatex ifnotplaintext ifnottex ifnotxml ifplaintext ifset iftex ifxml ignore " "indentedblock itemize " -"latex lisp macro menu multitable quotation raggedright rmacro " +"latex lisp macro menu multitable nodedescriptionblock quotation raggedright rmacro " "smalldisplay smallexample smallformat smallindentedblock smalllisp smallquotation table tex titlepage verbatim vtable " "xml " diff --git a/tools/Misc.py b/tools/Misc.py index ca98e08cf2..1b3e04675d 100644 --- a/tools/Misc.py +++ b/tools/Misc.py @@ -239,11 +239,13 @@ def find_new_texinfo_commands(path, lang): doc = re.sub(r'@comment\W.+', '', doc) macros = re.findall(r'@r?macro\s+(\w+)', doc) macros.extend(re.findall(r'@alias\s+(\w+)', doc)) - commands = re.findall(r'@(\w+)', doc) + # find inside "Command List" section + commands = re.findall(r'@itemx?\s+@@(\w+)', doc) + commands += ['c', 'comment', 'rmacro'] commands = set(commands) - set(macros) with open('texinfo-new.texi', 'w', encoding='utf-8') as fd: doc = '\n@'.join(sorted(commands - existing)) - fd.write('mew commands:\n') + fd.write('new commands:\n') fd.write(f'@{doc}\n') fd.write('\nunknown commands:\n') doc = '\n@'.join(sorted(existing - commands)) diff --git a/tools/lang/Texinfo.texi b/tools/lang/Texinfo.texi index 0b2c84937d..589c7e8ec6 100644 --- a/tools/lang/Texinfo.texi +++ b/tools/lang/Texinfo.texi @@ -1,5 +1,5 @@ \input macro-definitions-file -@c 7.0.3 https://www.gnu.org/software/texinfo/ +@c 7.1 https://www.gnu.org/software/texinfo/ @c https://www.gnu.org/software/texinfo/manual/texinfo/html_node/Command-List.html @chapter A @@ -55,7 +55,6 @@ @code{sample-code} @codequotebacktick on-off @codequoteundirected on-off -@columnfractions @comma{} @command{command-name} @comment comment @@ -65,6 +64,10 @@ @copyright{} @chapter D +@defblock +@defline category name arguments… +@deftypeline category data-type name arguments… +@end defblock @defcodeindex index-name @defcv category class name @end defcv @@ -266,7 +269,7 @@ @inlinefmtifelse{fmt, text, else-text} @inlineifclear{var, text} @inlineifset{var, text} -@inlineraw{fmt, raw-text} +@inlineraw{format, text} @insertcopying @item @itemize mark-generating-character-or-command @@ -286,6 +289,8 @@ @latex @end latex @leq{} +@linemacro macroname {params} +@link{nodename, label, manual-name} @lisp @end lisp @listoffloats @@ -306,6 +311,9 @@ @chapter N @need n @node name, [next], [previous], [up] +@nodedescription +@nodedescriptionblock +@end nodedescriptionblock @noindent @novalidate diff --git a/tools/lang/TypeScript.ts b/tools/lang/TypeScript.ts index 77b34f005b..136fd62bc0 100644 --- a/tools/lang/TypeScript.ts +++ b/tools/lang/TypeScript.ts @@ -1,4 +1,4 @@ -// 5.2 https://www.typescriptlang.org/docs/ +// 5.4 https://www.typescriptlang.org/docs/ // 1.8 https://github.com/microsoft/TypeScript/blob/main/doc/ //! keywords ===========================================================