Skip to content

Commit

Permalink
Update Texinfo command list to Texinfo 7.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
zufuliu committed Mar 6, 2024
1 parent b770b5f commit 2478f9c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
19 changes: 10 additions & 9 deletions src/EditLexers/stlTexinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand All @@ -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 "
Expand All @@ -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 "

Expand Down
6 changes: 4 additions & 2 deletions tools/Misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
14 changes: 11 additions & 3 deletions tools/lang/Texinfo.texi
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -55,7 +55,6 @@
@code{sample-code}
@codequotebacktick on-off
@codequoteundirected on-off
@columnfractions
@comma{}
@command{command-name}
@comment comment
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -286,6 +289,8 @@
@latex
@end latex
@leq{}
@linemacro macroname {params}
@link{nodename, label, manual-name}
@lisp
@end lisp
@listoffloats
Expand All @@ -306,6 +311,9 @@
@chapter N
@need n
@node name, [next], [previous], [up]
@nodedescription
@nodedescriptionblock
@end nodedescriptionblock
@noindent
@novalidate
Expand Down
2 changes: 1 addition & 1 deletion tools/lang/TypeScript.ts
Original file line number Diff line number Diff line change
@@ -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 ===========================================================
Expand Down

0 comments on commit 2478f9c

Please sign in to comment.