diff options
author | Karl Berry <karl@freefriends.org> | 2015-04-13 13:48:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-04-13 13:48:08 +0000 |
commit | 013bf3bc293cf08e4b4167cb42180bc355f399c0 (patch) | |
tree | 5235dfbae8830590c7fc6a0c70ecd3c84d22c677 /Master/texmf-dist/source/latex/base/ltdefns.dtx | |
parent | bacfc70aefdbc2ec3496c976ad12fe9ef26604e1 (diff) |
latex2e 2015/01/01
git-svn-id: svn://tug.org/texlive/trunk@36834 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/base/ltdefns.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/base/ltdefns.dtx | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/Master/texmf-dist/source/latex/base/ltdefns.dtx b/Master/texmf-dist/source/latex/base/ltdefns.dtx index a106bbbb074..e759ae73058 100644 --- a/Master/texmf-dist/source/latex/base/ltdefns.dtx +++ b/Master/texmf-dist/source/latex/base/ltdefns.dtx @@ -1,6 +1,6 @@ % \iffalse meta-comment % -% Copyright 1993-2014 +% Copyright 1993-2015 % The LaTeX3 Project and any individual authors listed elsewhere % in this file. % @@ -32,7 +32,7 @@ %<*driver> % \fi \ProvidesFile{ltdefns.dtx} - [2014/09/29 v1.3g LaTeX Kernel (definition commands)] + [2015/02/21 v1.4b LaTeX Kernel (definition commands)] % \iffalse \documentclass{ltxdoc} \GetFileInfo{ltdefns.dtx} @@ -47,13 +47,14 @@ Chris Rowley\and Rainer Sch\"opf} \begin{document} -\maketitle + \MaintainedByLaTeXTeam{latex} + \maketitle \DocInput{\filename} \end{document} %</driver> % \fi % -% \CheckSum{746} +% \CheckSum{805} % % \changes{v1.0n}{1994/05/10}{(ASAJ) Added % \cs{DeclareProtectedCommand}.} @@ -88,6 +89,8 @@ % \changes{v1.0g}{1994/11/17} % {\cs{@tempa} to \cs{reserved@a}} % \changes{v1.0p}{1995/07/13}{Updates to documentation} +% \changes{v1.4b}{2015/02/21} +% {Removed autoload support} % % \section{Definitions} % @@ -347,13 +350,36 @@ % % \changes{v1.2r}{1995/10/03} % {Add missing \cs{@typein} for /1710 (from patch file)} +% \changes{v1.4a}{2015/01/03}{use modified definition in luatex} +% \begin{macrocode} +\ifx\directlua\@undefined +% \end{macrocode} +% +% \begin{macrocode} +\def\@xtypein[#1]#2{% + \typeout{#2}% + \advance\endlinechar\@M + \read\@inputcheck to#1% + \advance\endlinechar-\@M + \@typein}% +% \end{macrocode} +% +% \begin{macrocode} +\else +% \end{macrocode} +% % \begin{macrocode} \def\@xtypein[#1]#2{% \typeout{#2}% - \advance\endlinechar\@M + \begingroup \endlinechar\m@ne \read\@inputcheck to#1% - \advance\endlinechar-\@M - \@typein} + \expandafter\endgroup + \expandafter\def\expandafter#1\expandafter{#1}% + \@typein}% +% \end{macrocode} +% +% \begin{macrocode} +\fi % \end{macrocode} % \end{macro} % @@ -488,14 +514,9 @@ % ``Default'' is the contents of the second optional argument of % |(re)newcommand|. % -% The |\aut@global| command below is only used in the autoload -% format. If it is |\global| then a global definition will be made. -% \changes{v1.2q}{1995/10/02} -% {Add \cs{aut@global} in autoload version} % \changes{v1.2z2}{1998/03/04} % {Unnecessary \cs{expandafter} removed: pr/2758} % \begin{macrocode} -%<autoload>\aut@global \expandafter\def\expandafter#1\expandafter{% \expandafter \@protected@testopt @@ -581,8 +602,9 @@ % works. I am not sure this is worth it, as a following % |\newcommand| would over-write the definition of |\reserved@a|. % -% Recall that \LaTeX2.09 goes into an infinite loop with -% |\renewcommand[1]{\@tempa}{foo}| (DPC 6 October 93). +% Recall that \LaTeX2.09 goes into an infinite loop with\\ +% |\renewcommand[1]{\@tempa}{foo}|\\ +% (DPC 6 October 93). % % Reorganised again (DPC 1999). Rather than make a loop to % construct the argument spec by counting, just extract the @@ -608,14 +630,9 @@ } % \end{macrocode} % -% The |\aut@global| command below is only used in the autoload -% format. If it is |\global| then a global definition will be made. -% \changes{v1.2q}{1995/10/02} -% {Add \cs{aut@global} in autoload version} % \begin{macrocode} \long \def \@yargd@f#1#2{% \def \reserved@a ##1#1##2##{% -%<autoload>\aut@global \expandafter\def\expandafter#2\reserved@b ##1#1% }% \l@ngrel@x \reserved@a 0##1##2##3##4##5##6##7##8##9###1% @@ -764,11 +781,6 @@ {\@latex@error{Environment #1 undefined}\@ehc }\relax \expandafter\let\csname#1\endcsname\relax -% \end{macrocode} -% \changes{v1.2q}{1995/10/02} -% {Add \cs{aut@global} in autoload version} -% \begin{macrocode} -%<autoload>\aut@global \expandafter\let\csname end#1\endcsname\relax \new@environment{#1}} % \end{macrocode} @@ -795,26 +807,18 @@ \relax \expandafter\new@command \csname #1\endcsname#2{#3}% -% \end{macrocode} -% \changes{v1.2q}{1995/10/02} -% {Add \cs{aut@global} in autoload version} -% \begin{macrocode} -%<autoload>\aut@global \l@ngrel@x\expandafter\def\csname end#1\endcsname{#4}} % \end{macrocode} % \end{macro} % % \begin{macro}{\newif} % \changes{v1.1l}{1995/05/24}{(DPC) New implementation} -% \changes{v1.2q}{1995/10/02} -% {Add \cs{aut@global} in autoload version} % And here's a different sort of allocation: % For example, % |\newif\iffoo| creates |\footrue|, |\foofalse| to go with |\iffoo|. % \begin{macrocode} \def\newif#1{% \count@\escapechar \escapechar\m@ne -%<autoload>\aut@global \let#1\iffalse \@if#1\iftrue \@if#1\iffalse @@ -822,11 +826,8 @@ % \end{macrocode} % % \begin{macro}{\@if} -% \changes{v1.2q}{1995/10/02} -% {Add \cs{aut@global} in autoload version} % \begin{macrocode} \def\@if#1#2{% -%<autoload>\aut@global \expandafter\def\csname\expandafter\@gobbletwo\string#1% \expandafter\@gobbletwo\string#2\endcsname {\let#1#2}} @@ -1112,11 +1113,6 @@ \edef\reserved@a{\string#1}% \def\reserved@b{#1}% \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}% -% \end{macrocode} -% \changes{v1.2s}{1995/10/06} -% {Add \cs{aut@global} in autoload version} -% \begin{macrocode} -%<autoload>\aut@global \edef#1{% \ifx\reserved@a\reserved@b \noexpand\x@protect @@ -1215,6 +1211,55 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\MakeRobust} +% \changes{v1.4a}{2015/01/08}{Added macro} +% +% The macro firstly checks if the controls sequence in question exists +% at all. +% \begin{macrocode} +%</2ekernel> +%<latexrelease>\IncludeInRelease{2015/01/01}{\MakeRobust}{\MakeRobust}% +%<*2ekernel|latexrelease> +\def\MakeRobust#1{% + \@ifundefined{\expandafter\@gobble\string#1}{% + \@latex@error{The control sequence `\string#1' is undefined!% + \MessageBreak There is nothing here to make robust}% + \@eha + }% +% \end{macrocode} +% Then we check if the macro is already robust. We do this by testing +% if the internal name for a robust macro is defined, namely +% \verb*=\foo =. If it is already defined do nothing, otherwise set +% \verb*=\foo = equal to \verb*=\foo= and redefine \verb*=\foo= so +% that it acts like a macro defined with \verb=\DeclareRobustCommand=. +% \begin{macrocode} + {% + \@ifundefined{\expandafter\@gobble\string#1\space}% + {% + \expandafter\let\csname + \expandafter\@gobble\string#1\space\endcsname=#1% + \edef\reserved@a{\string#1}% + \def\reserved@b{#1}% + \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}% + \edef#1{% + \ifx\reserved@a\reserved@b + \noexpand\x@protect\noexpand#1% + \fi + \noexpand\protect\expandafter\noexpand + \csname\expandafter\@gobble\string#1\space\endcsname}% + }% + {\@latex@info{The control sequence `\string#1' is already robust}}% + }% +}% +%</2ekernel|latexrelease> +%<latexrelease>\EndIncludeInRelease +%<latexrelease>\IncludeInRelease{0000/00/00}{\MakeRobust}{\MakeRobust}% +%<latexrelease>\let\MakeRobust\@undefined +%<latexrelease>\EndIncludeInRelease +%<*2ekernel> +% \end{macrocode} +% \end{macro} +% % \subsection{Internal defining commands} % % These commands are used internally to define other \LaTeX{} @@ -1405,51 +1450,6 @@ %</2ekernel> % \end{macrocode} % -% \subsection{Commands for Autoloading} -% -% \begin{macrocode} -%<*autoload> -% \end{macrocode} -% -% \begin{macro}{\aut@global} -% \changes{v1.2q}{1995/10/02} -% {Macro added} -% This command is only defined in the `autoload' format. It is -% normally |\relax| but may be set to |\global|, in which case -% |\newif| and the commands based on |\newcommand| will all make -% global definitions. -% \begin{macrocode} -\let\aut@global\relax -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@autoload} -% \changes{v1.2q}{1995/10/02} -% {Macro added} -% \changes{v1.2t}{1995/10/09} -% {Use \cs{@@input} not \cs{input} to save string space and -% stops autoload files appearing in \cs{listfiles}} -% \changes{v1.2v}{1995/10/24}{ignore end-of-line} -% This macro is only defined in the `autoload' format. It inputs a -% package `|auto#1.sty|' within a local group, and with normalised -% catcodes. |\aut@global| is set to |\global| so that |\newif| -% |\newcommand| and related commands make global definitions. -% \begin{macrocode} -\def\@autoload#1{% - \begingroup - \makeatletter - \let\aut@global\global - \nfss@catcodes - \catcode`\ =10 - \let\@latex@e@error\@gobble - \@@input auto#1.sty\relax - \endgroup} -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -%</autoload> -% \end{macrocode} % % \Finale % |