summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-26 20:30:56 +0000
committerKarl Berry <karl@freefriends.org>2021-07-26 20:30:56 +0000
commit20c23ef020fe9c84c498fda3807e85403256f199 (patch)
tree47da1ded878a6edad4f810a5d20cffee07026c4e /Master/texmf-dist/tex/latex
parent9de42f6753253d4c200fa10a656f3be80c9b1467 (diff)
macrolist (26jul21)
git-svn-id: svn://tug.org/texlive/trunk@60081 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/macrolist/macrolist.sty30
1 files changed, 17 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/macrolist/macrolist.sty b/Master/texmf-dist/tex/latex/macrolist/macrolist.sty
index 36397cc9175..1fd3fe0f32d 100644
--- a/Master/texmf-dist/tex/latex/macrolist/macrolist.sty
+++ b/Master/texmf-dist/tex/latex/macrolist/macrolist.sty
@@ -15,7 +15,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{macrolist}[2021/07/23 v1.2.0 Create lists of macros and perform operations on them]
+\ProvidesPackage{macrolist}[2021/07/25 v1.2.1 Create lists of macros and perform operations on them]
\RequirePackage{pgffor}
@@ -35,24 +35,28 @@
\newcommand{\listindexof}[2]{%
\def\macrolist@listindex{0}%
\macrolist@exists{#1}%
- \def\macrolist@el{#2}%
- \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{%
- \ifx\macrolist@el\macrolist@listindexel
- \xdef\macrolist@listindex{\macrolist@index}%
- \fi
- }%
+ \ifnum\listsize{#1}>0\relax
+ \def\macrolist@el{#2}%
+ \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{%
+ \ifx\macrolist@el\macrolist@listindexel
+ \xdef\macrolist@listindex{\macrolist@index}%
+ \fi
+ }%
+ \fi
\macrolist@listindex%
\let\macrolist@listindex\relax%
}
\newcommand{\listcontains}[4]{%
\def\macrolist@listindex{0}%
\macrolist@exists{#1}%
- \def\macrolist@el{#2}%
- \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{%
- \ifx\macrolist@el\macrolist@listindexel
- \xdef\macrolist@listindex{\macrolist@index}%
- \fi
- }%
+ \ifnum\listsize{#1}>0\relax
+ \def\macrolist@el{#2}%
+ \listforeach{#1}{\macrolist@listindexel}[\listsize{#1}][1]{%
+ \ifx\macrolist@el\macrolist@listindexel
+ \xdef\macrolist@listindex{\macrolist@index}%
+ \fi
+ }%
+ \fi
\ifnum\macrolist@listindex>0\relax
#3%
\else