>>>>> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
Georg> Sorry, wrong patch (contained some unrelated test stuff), use
Georg> this instead. Georg
It looks good, except this bit that I do not like much:
+ (next.cs() == "end" && (context.layout->latextype ==
LATEX_ITEM_ENVIRONMENT ||
+ context.layout->latextype ==
LATEX_LIST_ENVIRONMENT ||
+ active_environment() == "quotation" ||
+ active_environment() == "quote" ||
+ active_environment() == "verse" ||
+ // LyX emits a newline before \end{lyxcode}.
+ // This newline must be ignored,
+ // otherwise LyX will add an additional protected
space.
+ (active_environment() == "lyxcode" && curr.cat()
== catNewline))) ||
What features are your trying to test for exactly? What is so special
about quotation and verse?
If you want to test for lyxcode-like environments (we have also the
Scrap environment in literate programming mode), the right way is to
test something like context.layout->free_spacing.
Despite the comment above the function, I am not sure that I
understand the logic.
Also, if there are cases where LyX' LaTeX output is weird, you may ask
to change it rather than cope with it...
JMarc