texlive[71355] Master/texmf-dist: listings (25may24)

commits+karl at tug.org commits+karl at tug.org
Sat May 25 21:35:24 CEST 2024


Revision: 71355
          https://tug.org/svn/texlive?view=revision&revision=71355
Author:   karl
Date:     2024-05-25 21:35:23 +0200 (Sat, 25 May 2024)
Log Message:
-----------
listings (25may24)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/listings/listings-devel.pdf
    trunk/Master/texmf-dist/doc/latex/listings/listings.pdf
    trunk/Master/texmf-dist/doc/latex/listings/lstdrvrs.pdf
    trunk/Master/texmf-dist/source/latex/listings/listings.dtx
    trunk/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx
    trunk/Master/texmf-dist/source/latex/listings/lstdrvrs.ins
    trunk/Master/texmf-dist/tex/latex/listings/listings-acm.prf
    trunk/Master/texmf-dist/tex/latex/listings/listings-bash.prf
    trunk/Master/texmf-dist/tex/latex/listings/listings-fortran.prf
    trunk/Master/texmf-dist/tex/latex/listings/listings-hansl.prf
    trunk/Master/texmf-dist/tex/latex/listings/listings-lua.prf
    trunk/Master/texmf-dist/tex/latex/listings/listings-python.prf
    trunk/Master/texmf-dist/tex/latex/listings/listings-rexx.prf
    trunk/Master/texmf-dist/tex/latex/listings/listings.cfg
    trunk/Master/texmf-dist/tex/latex/listings/listings.sty
    trunk/Master/texmf-dist/tex/latex/listings/lstdoc.sty
    trunk/Master/texmf-dist/tex/latex/listings/lstlang1.sty
    trunk/Master/texmf-dist/tex/latex/listings/lstlang2.sty
    trunk/Master/texmf-dist/tex/latex/listings/lstlang3.sty
    trunk/Master/texmf-dist/tex/latex/listings/lstmisc.sty

Modified: trunk/Master/texmf-dist/doc/latex/listings/listings-devel.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/listings/listings.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/listings/lstdrvrs.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/listings/listings.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/listings/listings.dtx	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/source/latex/listings/listings.dtx	2024-05-25 19:35:23 UTC (rev 71355)
@@ -135,7 +135,7 @@
 %       Hoffmann became the maintainer of the \packagename{listings}
 %       package in 2013; see the Preface for details.}~ %
 %    \textless\lstemail\textgreater}
-% \date{2024/03/11\enspace\enspace Version 1.10a\ \box\abstractbox}
+% \date{2024/05/25\enspace\enspace Version 1.10b\ \box\abstractbox}
 % \def\lstemail{\href{mailto:j.hoffmann at fh-aachen.de}{\texttt{j.hoffmann(at)fh-aachen.de}}}
 % \ifhyper
 %   \hypersetup{pdftitle=The Listings Package,
@@ -3561,9 +3561,9 @@
 % other  & \texttt{!\ " \#\ \%\ \&\ ' ( ) * + , - .\ / :\ ; < = > ?}\\
 %        & {\catcode`\|=12\texttt{[ \char92\ ] \textasciicircum\ \char123\
 %            | \char125\ \textasciitilde}}\\
-% space  & chr(32)\\
-% tabulator & chr(9)\\
-% form feed & chr(12)\\
+% space  & \texttt{chr(32)}\footnotemark{}\\
+% tabulator & \texttt{chr(9)}\\
+% form feed & \texttt{chr(12)}\\
 % \noalign{\smallskip}
 % \end{tabular}
 % \par\noindent
@@ -3570,6 +3570,9 @@
 % Note: Extended characters of codes 128--255 (if defined) are \emph{currently}
 % letters.
 % \end{table}
+% \footnotetext{Here and at other places |chr(|\meta{number}|)| means a
+% Pascal function which returns the character which has ASCII value
+% \meta{number}.}
 %
 %
 % \paragraph{Strings}\label{uStrings}
@@ -4197,20 +4200,25 @@
 %
 % \subsection{Listings inside arguments}\label{uListingsArguments}
 %
-% At the moment it isn't possible to use \verb-\lstinline{...}- in a cell
+% A long time it wasn't possible to use \verb-\lstinline{...}- in a cell
 % of a table\makeatletter\@ifundefined{r at uProcessingInline}{}{%
 % (see section \ref{uProcessingInline} on page \pageref{uProcessingInline}
 % for more information)},%
 % \makeatother%
-% but it is possible to define a wrapper macro
-% which can be used instead of \verb-\lstinline{...}-:
+% but there was a recommended workaround. This workaround is still
+% functional, but now one can use \verb-\lstinline{...}- and of course
+% \verb-\lstinline|...|- directly:
 % \begin{lstsample}[lstlisting]{}{}
 %    \newcommand\foo{\lstinline{t}}
 %    \newcommand\foobar[2][]{\lstinline[#1]{#2}}
 %
 %    \begin{tabular}{ll}
-%    \foo & a variable\\
-%    \foobar[language=java]{int u;} & a declaration
+%    \lstinline|r| & a first variable (standard)\\
+%    \lstinline[language=java]|int s;| & a standard declaration \\
+%    \foo & a second variable (workaround)\\
+%    \foobar[language=java]{int u;} & a (workaraond) declaration \\
+%    \lstinline{v} & another variable using braces\\
+%    \lstinline[language=java]{int w;} & an additional braced declaration
 %    \end{tabular}
 % \end{lstsample}
 %
@@ -5744,7 +5752,7 @@
 % \item |\lst at Init\relax|
 % \item |\lst at Def{`#1}{\lst at DeInit\egroup}| installs the `end inline'
 %       detection, where |#1| is the next character after |\lstinline|.
-%       Moreover chr(13) is redefined to end the fragment in the same way but
+%       Moreover |chr(13)| is redefined to end the fragment in the same way but
 %       also issues an error message.
 % \item Now comes the source code and \ldots
 % \item \ldots\ |\lst at DeInit| (from |\lst at Def| above) ends the code snippet
@@ -5978,7 +5986,7 @@
 % \part{Implementation}
 %
 %
-% \CheckSum{12409}
+% \CheckSum{12435}
 %^^A
 %^^A Don't index TeX-primitives.
 %^^A
@@ -6122,8 +6130,8 @@
 % All files will have same date and version.
 %    \begin{macrocode}
 %<*kernel|misc|doc>
-\def\filedate{2024/03/11}
-\def\fileversion{1.10a}
+\def\filedate{2024/05/25}
+\def\fileversion{1.10b}
 %</kernel|misc|doc>
 %    \end{macrocode}
 % What we need and who we are.
@@ -6662,11 +6670,11 @@
     \ifx#1\relax
     \else \lccode`\^^@=`#1%
 %    \end{macrocode}
-% Otherwise we say that |^^@|=chr(0) is the lower case version of the first
+% Otherwise we say that |^^@|=|chr(0)| is the lower case version of the first
 % character.
 % Then we test the second character.
 % If there is none, we append the lower case |^^@| to |\lst at temp|.
-% Otherwise we say that |^^A|=chr(1) is the lower case version of the second
+% Otherwise we say that |^^A|=|chr(1)| is the lower case version of the second
 % character and we test the next argument, and so on.
 %    \begin{macrocode}
     \ifx#2\relax
@@ -6703,7 +6711,7 @@
     \lst at next}
 \endgroup
 %    \end{macrocode}
-% This |\endgroup| restores the catcodes of chr(0)--chr(8), but not the
+% This |\endgroup| restores the catcodes of |chr(0)|--|chr(8)|, but not the
 % catcodes of the characters inside |\lst at MakeActive@| since they are already
 % read.
 %
@@ -14552,7 +14560,7 @@
     \fi
     \lsthk at InitVars \lsthk at InitVarsBOL
 %    \end{macrocode}
-% The end of line character chr(13)=|^^M| controls the processing, see the
+% The end of line character |chr(13)|=|^^M| controls the processing, see the
 % definition of |\lst at MProcessListing| below.
 % The argument |#1| is either |\relax| or |\lstenv at backslash|.
 %    \begin{macrocode}
@@ -14904,36 +14912,35 @@
 % \subsubsection{Processing inline listings}\label{uProcessingInline}
 %
 % \begin{macro}{\lstinline}
-% In addition to |\lsthk at PreSet|, we use |boxpos=b| and flexiblecolumns.
-% I've inserted |\leavevmode| after bug report from \lsthelper{Michael~Weber}
-% {1999/12/16}{wrong spacing in list environments}. \lsthelper{Olivier~Lecarme}
-% {2001/07/30}{inconsistent `break' when \lstinline is used inside caption}
-% reported a problem which has gone after removing |\let| |\lst at newlines|
-% |\@empty| (now |\lst at newlines| is a counter!). Unfortunately I don't know
-% the reason for inserting this code some time ago! At the end of the macro we
-% check the delimiter.
-%    \begin{macrocode}
-\newcommand\lstinline[1][]{%
-    \leavevmode\bgroup % \hbox\bgroup --> \bgroup
-      \def\lst at boxpos{b}%
-      \lsthk at PreSet\lstset{flexiblecolumns,#1}%
-      \lsthk at TextStyle
-      \@ifnextchar\bgroup{%
-%    \end{macrocode}
-% \lsthelper{Luc~Van~Eycken}{2014/01/22}{\rcmdname\lstinline{} in alignments}
-% reported, that the experimental implementation of |\lstinline| with
-% braces instead of characters surrounding the source code resulted in an
-% error if used in a tabular environment. He found that this error comes
-% from the master counter (cf. appendix D (Dirty Tricks), item 5. (Brace
-% hacks), of the TeXbook (p. 385-386)). Adding the following line at this
-% point
+%     In addition to |\lsthk at PreSet|, we use |boxpos=b| and
+%     flexiblecolumns.  I've inserted |\leavevmode| after bug report from
+%     \lsthelper{Michael~Weber} {1999/12/16}{wrong spacing in list
+%     environments}. \lsthelper{Olivier~Lecarme} {2001/07/30}{inconsistent
+%     `break' when \lstinline is used inside caption} reported a problem
+%     which has gone after removing |\let| |\lst at newlines| |\@empty| (now
+%     |\lst at newlines| is a counter!). Unfortunately I don't know the reason
+%     for inserting this code some time ago! At the end of the macro we
+%     check the delimiter.\footnote{This is text of the original author
+%     Carsten Heinz.}
+%
+%     Then came an experimental version which allowed braces, but
+%     \lsthelper{Luc~Van~Eycken}{2014/01/22}{\rcmdname\lstinline{} in
+%     alignments} reported, that the experimental implementation of
+%     |\lstinline| with braces instead of characters surrounding the source
+%     code resulted in an error if used in a tabular environment.
+%
+%     He found that this error comes from the master counter (cf. appendix
+%     D (Dirty Tricks), item 5. (Brace hacks), of the TeXbook
+%     (p. 385-386)). Adding the following line after testing the next
+%     character (line no. 7 in the following outcommented snippet)
 %\begin{verbatim}
-%         \ifnum`{=0}\fi%
+%\ifnum`{=0}\fi%
 %\end{verbatim}
-% remedies the wrong behaviour. But \lsthelper{Qing~Lee}{2014/06/28}{-}
-% pointed out, that this breaks code like the one showed in
-% \ref{uListingsArguments} on \pageref{uListingsArguments} and proposed
-% another solution which in turn broke the code needed by Luc:
+%     remedies the wrong behaviour. But \lsthelper{Qing~Lee}{2014/06/28}{-}
+%     pointed out, that this breaks code like the one shown in section
+%     \ref{uListingsArguments} on page \pageref{uListingsArguments} and
+%     proposed another solution which in turn broke the code provided by
+%     Luc:
 %\begin{verbatim}
 % \renewcommand\lstinline[1][]{%
 %   \leavevmode\bgroup % \hbox\bgroup --> \bgroup
@@ -14944,20 +14951,45 @@
 %   \@ifnextchar\bgroup{%
 %     \ifnum`{=\z@}\fi%
 %     \afterassignment\lst at InlineG \let\@let at token}{%
-%     \ifnum`{=\z@}\fi\lstinline@}}
+%     \ifnum`{=\z@}\fi\lstinline@}%
+%}
 %\end{verbatim}
-% So finally the old code comes back and the people, who need a
-% |\lstinline| with braces, should use the workaround from section
-% \ref{uListingsArguments} on page \pageref{uListingsArguments}.
+%     So finally the old code came back and the people, who needed a
+%     |\lstinline| with braces, should use the workaround from section
+%     \ref{uListingsArguments} on page \pageref{uListingsArguments}.
+%
+%     This long outstanding deficiency is now repaired by
+%     \lsthelper{user5028841}{2024/05/05}{Regarding the Listings package}
+%     who provided a solution by using special characters as begin and end
+%     of a group:
 %    \begin{macrocode}
-        \afterassignment\lst at InlineG \let\@let at token}%
-                         \lstinline@}
+\edef\lst at temp{\the\catcode`\^^@}
+\catcode`\^^@=1
+\newcommand\lstinline[1][]{%
+  \leavevmode\bgroup % \hbox\bgroup --> \bgroup
+  \def\lst at boxpos{b}%
+  \lsthk at PreSet\lstset{flexiblecolumns,#1}%
+  \lsthk at TextStyle
+  \@ifnextchar\bgroup{%
+    \afterassignment\lst at InlineG \romannumeral`^^@\iffalse}\fi
+  \let\@let at token}%
+  \lstinline@}
+%    \end{macrocode}
+% Here we restore the previous catcode of |\^^@|:
+%    \begin{macrocode}
+\catcode`\^^@=\lst at temp
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\lst at inline@}
+%     This is the standard method after processing the optional arguments
+%     of |\lstinline|.
+%    \begin{macrocode}
 \def\lstinline@#1{%
-    \lst at Init\relax
-    \lst at IfNextCharActive{\lst at InlineM#1}{\lst at InlineJ#1}}
-\lst at AddToHook{TextStyle}{}% init
+  \lst at Init\relax
+  \lst at IfNextCharActive{\lst at InlineM#1}{\lst at InlineJ#1}}
 %    \end{macrocode}
 %    \begin{macrocode}
+\lst at AddToHook{TextStyle}{}% init
 \lst at AddToHook{SelectCharTable}{\lst at inlinechars}
 \global\let\lst at inlinechars\@empty
 %    \end{macrocode}
@@ -14965,15 +14997,17 @@
 %
 % \begin{macro}{\lst at InlineM}
 % \begin{macro}{\lst at InlineJ}
-% treat the cases of `normal' inlines and inline listings inside an argument.
-% In the first case the given character ends the inline listing and EOL within
-% such a listing immediately ends it and produces an error message.
+%     treat the cases of `normal' inlines and inline listings inside an
+%     argument.  In the first case the given character ends the inline
+%     listing and EOL within such a listing immediately ends it and
+%     produces an error message.
 %    \begin{macrocode}
-\def\lst at InlineM#1{\gdef\lst at inlinechars{%
+\def\lst at InlineM#1{%
+  \gdef\lst at inlinechars{%
     \lst at Def{`#1}{\lst at DeInit\egroup\global\let\lst at inlinechars\@empty}%
     \lst at Def{13}{\lst at DeInit\egroup \global\let\lst at inlinechars\@empty
-        \PackageError{Listings}{lstinline ended by EOL}\@ehc}}%
-    \lst at inlinechars}
+      \PackageError{Listings}{lstinline ended by EOL}\@ehc}}%
+  \lst at inlinechars}
 %    \end{macrocode}
 % In the other case we get all characters up to |#1|, make these characters
 % active, execute (typeset) them and end the listing (all via temporary macro).
@@ -14980,41 +15014,51 @@
 % That's all about it.
 %    \begin{macrocode}
 \def\lst at InlineJ#1{%
-    \def\lst at temp##1#1{%
-        \let\lst at arg\@empty \lst at InsideConvert{##1}\lst at arg
-        \lst at DeInit\egroup}%
-    \lst at temp}
+  \def\lst at temp##1#1{%
+    \let\lst at arg\@empty \lst at InsideConvert{##1}\lst at arg
+    \lst at DeInit\egroup}%
+  \lst at temp}
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
 %
 % \begin{macro}{\lst at InlineG}
-% is experimental.
+%     is experimental.
 %    \begin{macrocode}
 \def\lst at InlineG{%
-    \lst at Init\relax
-    \lst at IfNextCharActive{\lst at InlineM\}}%
-                         {\let\lst at arg\@empty \lst at InlineGJ}}
+  \lst at Init\relax
+  \lst at IfNextCharActive{\lst at InlineM\}}{%
+    \let\lst at arg\@empty \lst at InlineGJ}}
+%    \end{macrocode}
+%     This is the point for closing the group:
+%    \begin{macrocode}
+\edef\lst at temp{\the\catcode`\^^@}
+\catcode`\^^@=2
 \def\lst at InlineGJ{\futurelet\@let at token\lst at InlineGJTest}
 \def\lst at InlineGJTest{%
-    \ifx\@let at token\egroup
-        \afterassignment\lst at InlineGJEnd
-        \expandafter\let\expandafter\@let at token
+  \ifx\@let at token\egroup
+    \iffalse{\fi\romannumeral`^^@
+      \afterassignment\lst at InlineGJEnd
+      \expandafter\let\expandafter\@let at token
+  \else
+    \ifx\@let at token\@sptoken
+      \let\lst at next\lst at InlineGJReadSp
     \else
-        \ifx\@let at token\@sptoken
-            \let\lst at next\lst at InlineGJReadSp
-        \else
-            \let\lst at next\lst at InlineGJRead
-        \fi
-        \expandafter\lst at next
+      \let\lst at next\lst at InlineGJRead
+    \fi
+    \expandafter\lst at next
     \fi}
+%    \end{macrocode}
+%     As before: restore the previous catcode of |\^^@|:
+%    \begin{macrocode}
+\catcode`\^^@=\lst at temp
 \def\lst at InlineGJEnd{\lst at arg\lst at DeInit\egroup}
 \def\lst at InlineGJRead#1{%
-    \lccode`\~=`#1\lowercase{\lst at lAddTo\lst at arg~}%
-    \lst at InlineGJ}
+  \lccode`\~=`#1\lowercase{\lst at lAddTo\lst at arg~}%
+  \lst at InlineGJ}
 \def\lst at InlineGJReadSp#1{%
-    \lccode`\~=`\ \lowercase{\lst at lAddTo\lst at arg~}%
-    \lst at InlineGJ#1}
+  \lccode`\~=`\ \lowercase{\lst at lAddTo\lst at arg~}%
+  \lst at InlineGJ#1}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -15313,7 +15357,7 @@
 %
 % \begin{macro}{\lst at MSkipToFirst}
 % We just look whether to drop more lines or to leave the mode which restores
-% the definition of chr(13) and chr(10).
+% the definition of |chr(13)| and |chr(10)|.
 %    \begin{macrocode}
 \def\lst at MSkipToFirst{%
     \global\advance\lst at lineno\@ne
@@ -15391,7 +15435,7 @@
 %    \end{macrocode}
 % We must append an active backslash and the `end string' to |\lst at arg|. So all
 % (in fact most) other processing won't notice that the code has been inside
-% an argument. But the EOL character is chr(10)=|^^J| now and not chr(13).
+% an argument. But the EOL character is |chr(10)|=|^^J| now and not |chr(13)|.
 %    \begin{macrocode}
 \begingroup \lccode`\~=`\\\lowercase{%
 \gdef\lstenv at ProcessJ@{%

Modified: trunk/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/source/latex/listings/lstdrvrs.dtx	2024-05-25 19:35:23 UTC (rev 71355)
@@ -1,6 +1,6 @@
 % \iffalse
 %
-% Time-stamp: <2024-03-12 09:33:03 ax006ho>
+% Time-stamp: <2024-05-25 06:23:16 ax006ho>
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -33,7 +33,7 @@
 % \title{Language, Style and Format drivers\\ for \textsf{Listings}\\
 %   {\large by Carsten Heinz and individual authors:}}
 % \author{\InputIfFileExists{lstdrvrs.tmp}{}{}}
-% \date{2024/03/11\enspace\enspace Version 1.10a\ \box\abstractbox}
+% \date{2024/05/25\enspace\enspace Version 1.10b\ \box\abstractbox}
 %
 % \ifhyper
 %   \hypersetup{pdftitle={Language, Style and Format drivers for the
@@ -138,7 +138,7 @@
 % \endgroup
 % We mainly define default dialects.
 %    \begin{macrocode}
-\ProvidesFile{listings.cfg}[2024/03/11 1.10a listings configuration]
+\ProvidesFile{listings.cfg}[2024/05/25 1.10b listings configuration]
 \def\lstlanguagefiles
     {lstlang0.sty,lstlang1.sty,lstlang2.sty,lstlang3.sty}
 \lstset{defaultdialect=[R/3 6.10]ABAP,
@@ -154,6 +154,7 @@
         defaultdialect=[11.0]Mathematica,
         defaultdialect=[OMG]OCL,
         defaultdialect=[Standard]Pascal,
+        defaultdialect=[2]Python,
         defaultdialect=[67]Simula,
         defaultdialect=[plain]TeX,
         defaultdialect=[97]VRML}
@@ -186,7 +187,7 @@
 %<+lua-prf>\ProvidesFile{listings-lua.prf}
 %<+python-prf>\ProvidesFile{listings-python.prf}
 %<+rexx-prf>\ProvidesFile{listings-rexx.prf}
-%<-config>    [2024/03/11 1.10a listings language file]
+%<-config>    [2024/05/25 1.10b listings language file]
 %    \end{macrocode}
 %
 %
@@ -7819,7 +7820,8 @@
 %
 % In August 2013
 % \lstthanks{Alexis~Dimitriadis}{A.Dimitriadis at uu.nl}{2013/08/15} reworked
-% the definition by supplying the builtins.
+% the definition by supplying the builtins. The current version is based on
+% \url{https://docs.python.org/2/reference/lexical_analysis.html#identifiers}.
 % \begingroup
 %    \begin{macrocode}
 %<*lang1>
@@ -7828,17 +7830,22 @@
 %%
 %% Python definition (c) 1998 Michael Weber
 %% Additional definitions (2013) Alexis Dimitriadis
+%% small corrections based on
+%% https://docs.python.org/2/reference/lexical_analysis.html#identifiers
 %%
-\lst at definelanguage{Python}{%
-  morekeywords={access, and, break, class, continue, def, del, elif, else,%
-    except, exec, finally, for, from, global, if, import, in, is, lambda,%
-    not, or, pass, print, raise, return, try, while},%
+\lst at definelanguage[2]{Python}{%
+  morekeywords={and, as, assert, break, class, continue, def, del, elif,%
+    else, except, exec, finally, for, from, global, if, import, in, is,%
+    lambda, not, or, pass, print, raise, return, try, while, with, yield},%
 %    \end{macrocode}
-% Python has a long list of builtin-in functions
+% Python has a long list of builtin-in functions (altogether 76 entries
+% plus 5 special ones)
 % (\url{http://docs.python.org/2/library/functions.html}) and it is a good
-% idea to make them visible in printed code
+% idea to make them visible in printed code.
 %    \begin{macrocode}
-  % Built-ins
+  % Built-ins according to
+  % http://docs.python.org/2/library/functions.html,
+  % the last five entries are known as advanced or not essential
   morekeywords=[2]{abs, all, any, basestring, bin, bool, bytearray,%
     callable, chr, classmethod, cmp, compile, complex, delattr, dict, dir,%
     divmod, enumerate, eval, execfile, file, filter, float, format,%
@@ -7847,43 +7854,96 @@
     memoryview, min, next, object, oct, open, ord, pow, property, range,%
     raw_input, reduce, reload, repr, reversed, round, set, setattr, slice,%
     sorted, staticmethod, str, sum, super, tuple, type, unichr, unicode,%
-    vars, xrange, zip, apply, buffer, coerce, intern},%
+    vars, xrange, zip, __import__, apply, buffer, coerce, intern},%
   sensitive=true,%
   morecomment=[l]\#,%
+  morestring=[s]{'''}{'''},% used for documentation text
+                           % (multiline strings)
+  morestring=[s]{"""}{"""},% added by Philipp Matthias Hahn
   morestring=[b]',%
-  morestring=[b]",%
+  morestring=[b]"%
+}
 %    \end{macrocode}
-% According to PEP (Python Enhancement Proposals) comment should be
-% distinguished from documentation strings, so we define
+% \lsthelper{Philipp Matthias Hahn}{pmhahn at titan.lahn.de}{2002/04/18}{}
+% added the third comment above.
+% \lsthelper{eRreuR}{rogspr at newdeal.ch}{2002/05/28} {probl\`eme avec
+% "listings" et le langage Python} found a bug using Python and
+% \lsthelper{Nicolas Markey}{markey at lsv.ens-cachan.fr}{2002/05/29}
+% {listings and Python} informed me about the corresponding thread on
+% \texttt{fr.comp.text.tex} and provided the fix---adding \texttt{[b]} to
+% both \texttt{morestring} declarations.
+%
+% \lsthelper{J\"urgen Dietel}{j.dietel at rz.rwth-aachen}{2015/05/05}{}
+% provided an example with a wrong representation of documentation strings,
+% so the two lines added by Philipp Matthias Hahn got changed from
+% |morestring| $\rightarrow$ |morecomment|.\footnote{According to PEP
+% (Python Enhancement Proposals---\url{https://peps.python.org/pep-0257/})
+% comment should be distinguished from documentation strings.}
+%
+% Python 3.0 was released in December 2008 and brought with it a number of
+% new features. \lsthelper{Naoki Sean
+% Pross}{npross at student.ethz.ch}{2024/05/25}{Python 3 syntax support for
+% the listings LaTeX package} provided the lists of new keywords and
+% built-in functions as well as the support for special strings.
 %    \begin{macrocode}
-  morecomment=[s]{'''}{'''},% used for documentation text
-                            % (mulitiline strings)
-  morecomment=[s]{"""}{"""},% added by Philipp Matthias Hahn
+\lst at definelanguage[3]{Python}[2]{Python}{%
+  % keywords
+  deletekeywords={exec, print},
+  morekeywords={False, None, True, async, await, nonlocal,
 %    \end{macrocode}
-% \lsthelper{J\"urgen Dietel}{j.dietel at rz.rwth-aachen}{2015/05/05}{} provided
-% an example with a wrong representation of documentation strings, so the
-% two lines above got changed from |morestring| $\rightarrow$ |morecomment|.
-%
-% Python now supports so called \emph{raw strings} and also Unicode
-% strings. Here is the definition of these strings:
+% Python knows so called soft keywords:
 %    \begin{macrocode}
-  morestring=[s]{r'}{'},% `raw' strings
-  morestring=[s]{r"}{"},%
-  morestring=[s]{r'''}{'''},%
-  morestring=[s]{r"""}{"""},%
-  morestring=[s]{u'}{'},% unicode strings
-  morestring=[s]{u"}{"},%
-  morestring=[s]{u'''}{'''},%
-  morestring=[s]{u"""}{"""}%
+                match, case},
+%    \end{macrocode}
+% The list of built-in functions has changed considerably (only 71 entries,
+% no special ones):
+%    \begin{macrocode}
+  % built-in functions
+  deletekeywords=[2]{apply, basestring, buffer, cmp, coerce, execfile, %
+    file, intern, long, raw_input, reduce, reload, unichr, unicode, xrange},
+  morekeywords=[2]{aiter, anext, ascii, breakpoint, bytes, exec},
+%    \end{macrocode}
+% Python now supports special strings like \emph{raw strings}, Unicode
+% strings, and some more. Here is the definition of these strings:
+%    \begin{macrocode}
+  % `raw' strings
+  morestring=[s]{r'}{'},
+  morestring=[s]{r"}{"},
+  morestring=[s]{r'''}{'''},
+  morestring=[s]{r"""}{"""},
+  morestring=[s]{R'}{'},
+  morestring=[s]{R"}{"},
+  morestring=[s]{R'''}{'''},
+  morestring=[s]{R"""}{"""},
+  % Unicode strings
+  morestring=[s]{u'}{'},
+  morestring=[s]{u"}{"},
+  morestring=[s]{u'''}{'''},
+  morestring=[s]{u"""}{"""},
+  morestring=[s]{U'}{'},
+  morestring=[s]{U"}{"},
+  morestring=[s]{U'''}{'''},
+  morestring=[s]{U"""}{"""},
+  % Format strings
+  morestring=[s]{f'}{'},
+  morestring=[s]{f"}{"},
+  morestring=[s]{f'''}{'''},
+  morestring=[s]{f"""}{"""},
+  morestring=[s]{F'}{'},
+  morestring=[s]{F"}{"},
+  morestring=[s]{F'''}{'''},
+  morestring=[s]{F"""}{"""},
+  % Byte literals
+  morestring=[s]{b'}{'},
+  morestring=[s]{b"}{"},
+  morestring=[s]{b'''}{'''},
+  morestring=[s]{b"""}{"""},
+  morestring=[s]{B'}{'},
+  morestring=[s]{B"}{"},
+  morestring=[s]{B'''}{'''},
+  morestring=[s]{B"""}{"""},
 }%
 %    \end{macrocode}
-% \lsthelper{Philipp Matthias Hahn}{pmhahn at titan.lahn.de}{2002/04/18}{}
-% added the third comment. \lsthelper{eRreuR}{rogspr at newdeal.ch}{2002/05/28}
-% {probl\`eme avec "listings" et le langage Python} found a bug using Python
-% and \lsthelper{Nicolas Markey}{markey at lsv.ens-cachan.fr}{2002/05/29}
-% {listings and Python} informed me about the corresponding thread on
-% \texttt{fr.comp.text.tex} and provided the fix---adding \texttt{[b]} to
-% both \texttt{morestring} declarations.
 %    \begin{macrocode}
 %</lang1>
 %    \end{macrocode}
@@ -7903,6 +7963,8 @@
 
 %% Actual colors from idlelib/config-highlight.def
 %%     --> corrected to ``web-safe''
+%% Unimplemented IDLE syntax: function/class names being
+%% defined should be blue
 %% strings  = #00aa00 / 0,170,0      (a darker green)
 %% builtins = #900090 / 144,0,144    (purple-ish)
 %% keywords = #FF7700 / 255,119,0    (quite close to plain `orange')
@@ -7958,6 +8020,7 @@
                  procedure,pull,push,queue,return,say,select,signal,then,%
                  to,trace,when},%
    sensitive=false,%
+   morecomment=[l]{--},%
    morecomment=[n]{/*}{*/},%
    morestring=[d]{'},%
    morestring=[d]{"},%
@@ -7999,7 +8062,6 @@
   sensitive=false,%
   morestring=[d]",%
   morestring=[d]',%
-  morecomment=[s]{/*}{*/},%
 }[keywords,comments,strings]
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -8026,7 +8088,7 @@
     ::options, ::requires, ::resource, ::routine,%
     forward, guard, local, loop, raise, strict,%
   },%
-  alsoletter={:},%
+  alsoletter={:}
 }[keywords,comments,strings]
 %    \end{macrocode}
 %    \begin{macrocode}
@@ -8042,38 +8104,22 @@
 %<*rexx-prf>
 %    \end{macrocode}
 %    \begin{macrocode}
-\usepackage{xcolor}
-\usepackage{textcomp}
+\usepackage{xcolor}                  % needed for colors like yellow!10
+\usepackage{textcomp}                % needed for upquote
 
-%% Actual colors from idlelib/config-highlight.def
-%%     --> corrected to ``web-safe''
-%% strings  = #00aa00 / 0,170,0      (a darker green)
-%% builtins = #900090 / 144,0,144    (purple-ish)
-%% keywords = #FF7700 / 255,119,0    (quite close to plain `orange')
-%\definecolor{IDLEorange}{RGB}{255,119,0} % pretty close to real orange
-%\definecolor{IDLEpurple}{RGB}{144,0,144}
-%\definecolor{IDLEgreen}{RGB}{0,170,0}
-%\definecolor{IDLEred}{RGB}{221,0,0}
-%% Corrected to ``web-safe''
-%\definecolor{orange2}{RGB}{255,102,0}
-\definecolor{purple2}{RGB}{153,0,153} % there's actually no standard purple
-\definecolor{green2}{RGB}{0,153,0} % a darker green
-%\definecolor{red2}{RGB}{221,0,0}
-
-% Except for green and purple, the other colors are pretty good in standard
-% hue
-\lstdefinestyle{python-idle-code}{%
-  language=Python,                   % the language
-  basicstyle=\normalsize\ttfamily,   % size of the fonts for the code
-  % Color settings to match IDLE style
-  keywordstyle=\color{orange},       % core keywords
-  keywordstyle={[2]\color{purple2}}, % built-ins
-  stringstyle=\color{green2},%
-  commentstyle=\color{red},%
+\lstdefinestyle{rexx-colored}{%
+  language=oorexx,                   % the language
+  backgroundcolor=\color{yellow!10},
+  basicstyle=\normalsize\ttfamily,   % size of the fonts for
+                                     % the code
+  % Color settings to match JHf's preferred style
+  keywordstyle=\color{blue},         % core keywords
+  keywordstyle={[2]\color{cyan}},    % built-ins
+  keywordstyle={[3]\color{olive}},   % special keywords
+  stringstyle=\color{teal},%
+  commentstyle=\color{orange},%
   upquote=true,                      % requires textcomp
 }
-% Unimplemented IDLE syntax: function/class names being defined should be
-% blue
 %    \end{macrocode}
 % This code is provided in the file |listings-rexx.prf|, see section
 % 2.4.1 (Preferences) of the \packagename{listings} documentation.

Modified: trunk/Master/texmf-dist/source/latex/listings/lstdrvrs.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/listings/lstdrvrs.ins	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/source/latex/listings/lstdrvrs.ins	2024-05-25 19:35:23 UTC (rev 71355)
@@ -57,7 +57,7 @@
 }
 
 \endbatchfile
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 \endinput
 %%
 %% End of file `lstdrvrs.ins'.

Modified: trunk/Master/texmf-dist/tex/latex/listings/listings-acm.prf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/listings-acm.prf	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/listings-acm.prf	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,7 +22,7 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{listings-acm.prf}
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 \usepackage[rgb, x11names]{xcolor}
 
 \definecolor{Comments}{rgb}{0.00,0.50,0.00}

Modified: trunk/Master/texmf-dist/tex/latex/listings/listings-bash.prf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/listings-bash.prf	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/listings-bash.prf	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,7 +22,7 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{listings-bash.prf}
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 \usepackage[rgb, x11names]{xcolor}
 
 \lstset{%

Modified: trunk/Master/texmf-dist/tex/latex/listings/listings-fortran.prf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/listings-fortran.prf	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/listings-fortran.prf	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,7 +22,7 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{listings-fortran.prf}
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 \usepackage[rgb, x11names]{xcolor}
 
 \lstset{%

Modified: trunk/Master/texmf-dist/tex/latex/listings/listings-hansl.prf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/listings-hansl.prf	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/listings-hansl.prf	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,7 +22,7 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{listings-hansl.prf}
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 \usepackage[rgb, x11names]{xcolor}
 
 \lstdefinestyle{hanslbw}{%

Modified: trunk/Master/texmf-dist/tex/latex/listings/listings-lua.prf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/listings-lua.prf	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/listings-lua.prf	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,7 +22,7 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{listings-lua.prf}
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 \usepackage[rgb, x11names]{xcolor}
 \lstdefinestyle{Lua}{%
   language=[5.2]Lua,

Modified: trunk/Master/texmf-dist/tex/latex/listings/listings-python.prf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/listings-python.prf	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/listings-python.prf	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,12 +22,14 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{listings-python.prf}
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 \usepackage{xcolor}
 \usepackage{textcomp}
 
 %% Actual colors from idlelib/config-highlight.def
 %%     --> corrected to ``web-safe''
+%% Unimplemented IDLE syntax: function/class names being
+%% defined should be blue
 %% strings  = #00aa00 / 0,170,0      (a darker green)
 %% builtins = #900090 / 144,0,144    (purple-ish)
 %% keywords = #FF7700 / 255,119,0    (quite close to plain `orange')

Modified: trunk/Master/texmf-dist/tex/latex/listings/listings-rexx.prf
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/listings-rexx.prf	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/listings-rexx.prf	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,27 +22,21 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{listings-rexx.prf}
-    [2024/03/11 1.10a listings language file]
-\usepackage{xcolor}
-\usepackage{textcomp}
+    [2024/05/25 1.10b listings language file]
+\usepackage{xcolor}                  % needed for colors like yellow!10
+\usepackage{textcomp}                % needed for upquote
 
-%% Actual colors from idlelib/config-highlight.def
-%%     --> corrected to ``web-safe''
-%% strings  = #00aa00 / 0,170,0      (a darker green)
-%% builtins = #900090 / 144,0,144    (purple-ish)
-%% keywords = #FF7700 / 255,119,0    (quite close to plain `orange')
-%% Corrected to ``web-safe''
-\definecolor{purple2}{RGB}{153,0,153} % there's actually no standard purple
-\definecolor{green2}{RGB}{0,153,0} % a darker green
-
-\lstdefinestyle{python-idle-code}{%
-  language=Python,                   % the language
-  basicstyle=\normalsize\ttfamily,   % size of the fonts for the code
-  % Color settings to match IDLE style
-  keywordstyle=\color{orange},       % core keywords
-  keywordstyle={[2]\color{purple2}}, % built-ins
-  stringstyle=\color{green2},%
-  commentstyle=\color{red},%
+\lstdefinestyle{rexx-colored}{%
+  language=oorexx,                   % the language
+  backgroundcolor=\color{yellow!10},
+  basicstyle=\normalsize\ttfamily,   % size of the fonts for
+                                     % the code
+  % Color settings to match JHf's preferred style
+  keywordstyle=\color{blue},         % core keywords
+  keywordstyle={[2]\color{cyan}},    % built-ins
+  keywordstyle={[3]\color{olive}},   % special keywords
+  stringstyle=\color{teal},%
+  commentstyle=\color{orange},%
   upquote=true,                      % requires textcomp
 }
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/listings/listings.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/listings.cfg	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/listings.cfg	2024-05-25 19:35:23 UTC (rev 71355)
@@ -21,7 +21,7 @@
 %% Send comments and ideas on the package, error reports and additional
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
-\ProvidesFile{listings.cfg}[2024/03/11 1.10a listings configuration]
+\ProvidesFile{listings.cfg}[2024/05/25 1.10b listings configuration]
 \def\lstlanguagefiles
     {lstlang0.sty,lstlang1.sty,lstlang2.sty,lstlang3.sty}
 \lstset{defaultdialect=[R/3 6.10]ABAP,
@@ -37,6 +37,7 @@
         defaultdialect=[11.0]Mathematica,
         defaultdialect=[OMG]OCL,
         defaultdialect=[Standard]Pascal,
+        defaultdialect=[2]Python,
         defaultdialect=[67]Simula,
         defaultdialect=[plain]TeX,
         defaultdialect=[97]VRML}

Modified: trunk/Master/texmf-dist/tex/latex/listings/listings.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/listings.sty	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/listings.sty	2024-05-25 19:35:23 UTC (rev 71355)
@@ -16,8 +16,8 @@
 %% Send comments and ideas on the package, error reports and additional
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
-\def\filedate{2024/03/11}
-\def\fileversion{1.10a}
+\def\filedate{2024/05/25}
+\def\fileversion{1.10b}
 \NeedsTeXFormat{LaTeX2e}
 \AtEndOfPackage{\ProvidesPackage{listings}
              [\filedate\space\fileversion\space(Carsten Heinz)]}
@@ -1932,54 +1932,63 @@
         \orig at float@addtolists{#1}}}%
   }{}%
 }%
+\edef\lst at temp{\the\catcode`\^^@}
+\catcode`\^^@=1
 \newcommand\lstinline[1][]{%
-    \leavevmode\bgroup % \hbox\bgroup --> \bgroup
-      \def\lst at boxpos{b}%
-      \lsthk at PreSet\lstset{flexiblecolumns,#1}%
-      \lsthk at TextStyle
-      \@ifnextchar\bgroup{%
-        \afterassignment\lst at InlineG \let\@let at token}%
-                         \lstinline@}
+  \leavevmode\bgroup % \hbox\bgroup --> \bgroup
+  \def\lst at boxpos{b}%
+  \lsthk at PreSet\lstset{flexiblecolumns,#1}%
+  \lsthk at TextStyle
+  \@ifnextchar\bgroup{%
+    \afterassignment\lst at InlineG \romannumeral`^^@\iffalse}\fi
+  \let\@let at token}%
+  \lstinline@}
+\catcode`\^^@=\lst at temp
 \def\lstinline@#1{%
-    \lst at Init\relax
-    \lst at IfNextCharActive{\lst at InlineM#1}{\lst at InlineJ#1}}
+  \lst at Init\relax
+  \lst at IfNextCharActive{\lst at InlineM#1}{\lst at InlineJ#1}}
 \lst at AddToHook{TextStyle}{}% init
 \lst at AddToHook{SelectCharTable}{\lst at inlinechars}
 \global\let\lst at inlinechars\@empty
-\def\lst at InlineM#1{\gdef\lst at inlinechars{%
+\def\lst at InlineM#1{%
+  \gdef\lst at inlinechars{%
     \lst at Def{`#1}{\lst at DeInit\egroup\global\let\lst at inlinechars\@empty}%
     \lst at Def{13}{\lst at DeInit\egroup \global\let\lst at inlinechars\@empty
-        \PackageError{Listings}{lstinline ended by EOL}\@ehc}}%
-    \lst at inlinechars}
+      \PackageError{Listings}{lstinline ended by EOL}\@ehc}}%
+  \lst at inlinechars}
 \def\lst at InlineJ#1{%
-    \def\lst at temp##1#1{%
-        \let\lst at arg\@empty \lst at InsideConvert{##1}\lst at arg
-        \lst at DeInit\egroup}%
-    \lst at temp}
+  \def\lst at temp##1#1{%
+    \let\lst at arg\@empty \lst at InsideConvert{##1}\lst at arg
+    \lst at DeInit\egroup}%
+  \lst at temp}
 \def\lst at InlineG{%
-    \lst at Init\relax
-    \lst at IfNextCharActive{\lst at InlineM\}}%
-                         {\let\lst at arg\@empty \lst at InlineGJ}}
+  \lst at Init\relax
+  \lst at IfNextCharActive{\lst at InlineM\}}{%
+    \let\lst at arg\@empty \lst at InlineGJ}}
+\edef\lst at temp{\the\catcode`\^^@}
+\catcode`\^^@=2
 \def\lst at InlineGJ{\futurelet\@let at token\lst at InlineGJTest}
 \def\lst at InlineGJTest{%
-    \ifx\@let at token\egroup
-        \afterassignment\lst at InlineGJEnd
-        \expandafter\let\expandafter\@let at token
+  \ifx\@let at token\egroup
+    \iffalse{\fi\romannumeral`^^@
+      \afterassignment\lst at InlineGJEnd
+      \expandafter\let\expandafter\@let at token
+  \else
+    \ifx\@let at token\@sptoken
+      \let\lst at next\lst at InlineGJReadSp
     \else
-        \ifx\@let at token\@sptoken
-            \let\lst at next\lst at InlineGJReadSp
-        \else
-            \let\lst at next\lst at InlineGJRead
-        \fi
-        \expandafter\lst at next
+      \let\lst at next\lst at InlineGJRead
+    \fi
+    \expandafter\lst at next
     \fi}
+\catcode`\^^@=\lst at temp
 \def\lst at InlineGJEnd{\lst at arg\lst at DeInit\egroup}
 \def\lst at InlineGJRead#1{%
-    \lccode`\~=`#1\lowercase{\lst at lAddTo\lst at arg~}%
-    \lst at InlineGJ}
+  \lccode`\~=`#1\lowercase{\lst at lAddTo\lst at arg~}%
+  \lst at InlineGJ}
 \def\lst at InlineGJReadSp#1{%
-    \lccode`\~=`\ \lowercase{\lst at lAddTo\lst at arg~}%
-    \lst at InlineGJ#1}
+  \lccode`\~=`\ \lowercase{\lst at lAddTo\lst at arg~}%
+  \lst at InlineGJ#1}
 \newcommand\lstMakeShortInline[1][]{%
   \def\lst at shortinlinedef{\lstinline[#1]}%
   \lstMakeShortInline@}%

Modified: trunk/Master/texmf-dist/tex/latex/listings/lstdoc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/lstdoc.sty	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/lstdoc.sty	2024-05-25 19:35:23 UTC (rev 71355)
@@ -6,8 +6,8 @@
 %%
 %% listings.dtx  (with options: `doc')
 %% 
-\def\filedate{2024/03/11}
-\def\fileversion{1.10a}
+\def\filedate{2024/05/25}
+\def\fileversion{1.10b}
 \ProvidesPackage{lstdoc}
              [\filedate\space\fileversion\space(Carsten Heinz)]
 \let\lstdoc at currversion\fileversion

Modified: trunk/Master/texmf-dist/tex/latex/listings/lstlang1.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/lstlang1.sty	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/lstlang1.sty	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,7 +22,7 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{lstlang1.sty}
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 %%
 %% ACSL definition (c) 2000 by Andreas Matthias
 %%
@@ -2944,12 +2944,16 @@
 %%
 %% Python definition (c) 1998 Michael Weber
 %% Additional definitions (2013) Alexis Dimitriadis
+%% small corrections based on
+%% https://docs.python.org/2/reference/lexical_analysis.html#identifiers
 %%
-\lst at definelanguage{Python}{%
-  morekeywords={access, and, break, class, continue, def, del, elif, else,%
-    except, exec, finally, for, from, global, if, import, in, is, lambda,%
-    not, or, pass, print, raise, return, try, while},%
-  % Built-ins
+\lst at definelanguage[2]{Python}{%
+  morekeywords={and, as, assert, break, class, continue, def, del, elif,%
+    else, except, exec, finally, for, from, global, if, import, in, is,%
+    lambda, not, or, pass, print, raise, return, try, while, with, yield},%
+  % Built-ins according to
+  % http://docs.python.org/2/library/functions.html,
+  % the last five entries are known as advanced or not essential
   morekeywords=[2]{abs, all, any, basestring, bin, bool, bytearray,%
     callable, chr, classmethod, cmp, compile, complex, delattr, dict, dir,%
     divmod, enumerate, eval, execfile, file, filter, float, format,%
@@ -2958,22 +2962,60 @@
     memoryview, min, next, object, oct, open, ord, pow, property, range,%
     raw_input, reduce, reload, repr, reversed, round, set, setattr, slice,%
     sorted, staticmethod, str, sum, super, tuple, type, unichr, unicode,%
-    vars, xrange, zip, apply, buffer, coerce, intern},%
+    vars, xrange, zip, __import__, apply, buffer, coerce, intern},%
   sensitive=true,%
   morecomment=[l]\#,%
+  morestring=[s]{'''}{'''},% used for documentation text
+                           % (multiline strings)
+  morestring=[s]{"""}{"""},% added by Philipp Matthias Hahn
   morestring=[b]',%
-  morestring=[b]",%
-  morecomment=[s]{'''}{'''},% used for documentation text
-                            % (mulitiline strings)
-  morecomment=[s]{"""}{"""},% added by Philipp Matthias Hahn
-  morestring=[s]{r'}{'},% `raw' strings
-  morestring=[s]{r"}{"},%
-  morestring=[s]{r'''}{'''},%
-  morestring=[s]{r"""}{"""},%
-  morestring=[s]{u'}{'},% unicode strings
-  morestring=[s]{u"}{"},%
-  morestring=[s]{u'''}{'''},%
-  morestring=[s]{u"""}{"""}%
+  morestring=[b]"%
+}
+\lst at definelanguage[3]{Python}[2]{Python}{%
+  % keywords
+  deletekeywords={exec, print},
+  morekeywords={False, None, True, async, await, nonlocal,
+                match, case},
+  % built-in functions
+  deletekeywords=[2]{apply, basestring, buffer, cmp, coerce, execfile, %
+    file, intern, long, raw_input, reduce, reload, unichr, unicode, xrange},
+  morekeywords=[2]{aiter, anext, ascii, breakpoint, bytes, exec},
+  % `raw' strings
+  morestring=[s]{r'}{'},
+  morestring=[s]{r"}{"},
+  morestring=[s]{r'''}{'''},
+  morestring=[s]{r"""}{"""},
+  morestring=[s]{R'}{'},
+  morestring=[s]{R"}{"},
+  morestring=[s]{R'''}{'''},
+  morestring=[s]{R"""}{"""},
+  % Unicode strings
+  morestring=[s]{u'}{'},
+  morestring=[s]{u"}{"},
+  morestring=[s]{u'''}{'''},
+  morestring=[s]{u"""}{"""},
+  morestring=[s]{U'}{'},
+  morestring=[s]{U"}{"},
+  morestring=[s]{U'''}{'''},
+  morestring=[s]{U"""}{"""},
+  % Format strings
+  morestring=[s]{f'}{'},
+  morestring=[s]{f"}{"},
+  morestring=[s]{f'''}{'''},
+  morestring=[s]{f"""}{"""},
+  morestring=[s]{F'}{'},
+  morestring=[s]{F"}{"},
+  morestring=[s]{F'''}{'''},
+  morestring=[s]{F"""}{"""},
+  % Byte literals
+  morestring=[s]{b'}{'},
+  morestring=[s]{b"}{"},
+  morestring=[s]{b'''}{'''},
+  morestring=[s]{b"""}{"""},
+  morestring=[s]{B'}{'},
+  morestring=[s]{B"}{"},
+  morestring=[s]{B'''}{'''},
+  morestring=[s]{B"""}{"""},
 }%
 %%
 %% Scilab definition (c) 2002,2003 Jean-Philippe Grivet

Modified: trunk/Master/texmf-dist/tex/latex/listings/lstlang2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/lstlang2.sty	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/lstlang2.sty	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,7 +22,7 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{lstlang2.sty}
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 %%
 %% Abap definition by Knut Lickert
 %%
@@ -1620,6 +1620,7 @@
                  procedure,pull,push,queue,return,say,select,signal,then,%
                  to,trace,when},%
    sensitive=false,%
+   morecomment=[l]{--},%
    morecomment=[n]{/*}{*/},%
    morestring=[d]{'},%
    morestring=[d]{"},%
@@ -1643,7 +1644,6 @@
   sensitive=false,%
   morestring=[d]",%
   morestring=[d]',%
-  morecomment=[s]{/*}{*/},%
 }[keywords,comments,strings]
 %%
 %% ooREXX keywords (http://www.oorexx.org/)
@@ -1652,7 +1652,7 @@
     ::options, ::requires, ::resource, ::routine,%
     forward, guard, local, loop, raise, strict,%
   },%
-  alsoletter={:},%
+  alsoletter={:}
 }[keywords,comments,strings]
 \lst at definelanguage{Ruby}%
   {morekeywords={__FILE__,__LINE__,BEGIN,END,alias,and,begin,break,%

Modified: trunk/Master/texmf-dist/tex/latex/listings/lstlang3.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/lstlang3.sty	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/lstlang3.sty	2024-05-25 19:35:23 UTC (rev 71355)
@@ -22,7 +22,7 @@
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
 \ProvidesFile{lstlang3.sty}
-    [2024/03/11 1.10a listings language file]
+    [2024/05/25 1.10b listings language file]
 \lst at definelanguage[68]{Algol}%
   {morekeywords={abs,and,arg,begin,bin,bits,bool,by,bytes,case,channel,%
       char,co,comment,compl,conj,divab,do,down,elem,elif,else,empty,%

Modified: trunk/Master/texmf-dist/tex/latex/listings/lstmisc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/listings/lstmisc.sty	2024-05-25 19:35:09 UTC (rev 71354)
+++ trunk/Master/texmf-dist/tex/latex/listings/lstmisc.sty	2024-05-25 19:35:23 UTC (rev 71355)
@@ -16,8 +16,8 @@
 %% Send comments and ideas on the package, error reports and additional
 %% programming languages to Jobst Hoffmann at <j.hoffmann at fh-aachen.de>.
 %%
-\def\filedate{2024/03/11}
-\def\fileversion{1.10a}
+\def\filedate{2024/05/25}
+\def\fileversion{1.10b}
 \ProvidesFile{lstmisc.sty}
              [\filedate\space\fileversion\space(Carsten Heinz)]
 \lst at CheckVersion\fileversion%



More information about the tex-live-commits mailing list.