From 6754a8cd4357c6c60e9fcca86b1804be59f50eb4 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Sun, 10 Apr 2016 21:01:25 +0000
Subject: asciilist (10apr16)

git-svn-id: svn://tug.org/texlive/trunk@40387 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/asciilist/asciilist.sty   | 26 +++++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/asciilist/asciilist.sty')

diff --git a/Master/texmf-dist/tex/latex/asciilist/asciilist.sty b/Master/texmf-dist/tex/latex/asciilist/asciilist.sty
index 3d4c65b254a..bbfc13c3ffc 100644
--- a/Master/texmf-dist/tex/latex/asciilist/asciilist.sty
+++ b/Master/texmf-dist/tex/latex/asciilist/asciilist.sty
@@ -20,12 +20,14 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{asciilist}
-    [2016/03/05 v2.1 Package for quickly creating nested lists]
+    [2016/03/31 v2.1b Package for quickly creating nested lists]
 \RequirePackage{etoolbox}
 \RequirePackage{trimspaces}
-\newenvironment{AsciiList}[2][\asclst@defaultenvs]{%
+\newenvironment{AsciiList}[2][]{%
   \bgroup
-  \edef\asclst@listenv{#1}%
+  \ifstrempty{#1}%
+    {\let\asclst@listenv=\asclst@defaultenvs}%
+    {\def\asclst@listenv{#1}}%
   \gdef\asclst@itemchars{}%
   \ifstrequal{#2}{auto}%
     {\asclst@autocharstrue}%
@@ -39,12 +41,12 @@
   \asclst@changelistlevel{\asclst@curlevel}{0}%
   \asclst@restorenewline%
   \egroup}
-\newcommand\AsciiListFromFile[3][\asclst@defaultenvs]{%
+\newcommand\AsciiListFromFile[3][]{%
   \AsciiList[#1]{#2}%
   \everyeof{\relax}%
   \expandafter\asclst@newline\@@input #3\relax
   \endAsciiList}
-\newcommand\AsciiListFromFiles[3][\asclst@defaultenvs]{%
+\newcommand\AsciiListFromFiles[3][]{%
   \AsciiList[#1]{#2}%
   \everyeof{\relax}%
   \def\asclst@@load##1{\expandafter\asclst@newline\@@input ##1\relax}%
@@ -233,7 +235,7 @@
 \newcommand*\AsciiDocListSetEnvironments[1]{%
   \def\asclst@docdefaultenvs{#1}}
 \AsciiDocListSetEnvironments{*=itemize,+=enumerate,;=Description}
-\newcommand*\NewAsciiListEnv[3][\asclst@defaultenvs]{%
+\newcommand*\NewAsciiListEnv[3][]{%
   \newenvironment{#3}%
     {\begin{AsciiList}[#1]{#2}}%
     {\end{AsciiList}}%
@@ -259,14 +261,16 @@
 {\catcode`\^^M=\active%
   \gdef\AsciiListEndArg#1#2^^M{%
     \begingroup%
-    \protected@edef\asclst@@result{%
-      \endgroup\unexpanded{#1}{\trim@pre@space{#2}}}%
+    \def\asclst@@result{#2}\trim@pre@space@in{\asclst@@result}%
+    \edef\asclst@@result{%
+      \endgroup\unexpanded{#1}{\expandonce{\asclst@@result}}}%
     \asclst@@result
   }%
   \gdef\AsciiListEndOArg#1#2^^M{%
     \begingroup%
-    \protected@edef\asclst@@result{%
-      \endgroup\unexpanded{#1}[\trim@pre@space{#2}]}%
+    \def\asclst@@result{#2}\trim@pre@space@in{\asclst@@result}%
+    \edef\asclst@@result{%
+      \endgroup\unexpanded{#1}[{\expandonce{\asclst@@result}}]}%
     \asclst@@result
   }%
 }
@@ -282,11 +286,11 @@
 \AsciiListRegisterEnv{paragraph}{}{}{\AsciiListEndArg{\paragraph}}
 \AsciiListRegisterDescEnv{description}
 \AsciiListRegisterDescEnv{compactdesc}
-\newcommand\asclst@BreakingDescItem[1][]{\item[#1]\leavevmode}
 \AsciiListRegisterEnv{Description}{\description}{\enddescription}%
                      {\AsciiListEndOArg{\asclst@BreakingDescItem}}
 \AsciiListRegisterEnv{CompactDesc}{\compactdesc}{\endcompactdesc}%
                      {\AsciiListEndOArg{\asclst@BreakingDescItem}}
+\newcommand\asclst@BreakingDescItem[1][]{\item[{#1}]\leavevmode}
 \endinput
 %%
 %% End of file `asciilist.sty'.
-- 
cgit v1.2.3

