[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [AUCTeX-devel] [PATCH 1/3] Parse env's defined with `\lstnewenvironm
From: |
Arash Esbati |
Subject: |
Re: [AUCTeX-devel] [PATCH 1/3] Parse env's defined with `\lstnewenvironment'. |
Date: |
Sat, 30 May 2015 18:59:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 |
Tassilo Horn <address@hidden> writes:
Hi Tassilo,
> I've applied all three PATCHES.
Thank you very much for applying them. Unfortunately, I made a mistake
here and this particular patch lacks a feature: It doesn't care about
the optional argument. And I can't see that AUCTeX cares about
opt. argument for user defined environments as opposed to commands,
e.g.:
--8<---------------cut here---------------start------------->8---
\documentclass[a4paper]{article}
\usepackage{color}
\newenvironment{colorenv}[2][red]{\color{#1}#2}{}
\newcommand{\colorcmd}[2][red]{{\color{#1}#2}}
\newcommand{\colorcmds}[3][red]{\color{#1}#2}#3}
\begin{document}
\begin{colorenv}
% (insert (format "\n%s" (LaTeX-environment-list)))
((abstract) (array LaTeX-env-array) (center) (colorenv) [snipped] )
\end{colorenv}
% (insert (format "\n%s" TeX-auto-symbol))
((colorcmds [argument] 2) (colorcmd [argument] 1))
--8<---------------cut here---------------end--------------->8---
Am I missing something? Any hint is appreciated.
Best, Arash