"Bo Peng" <[EMAIL PROTECTED]> writes: > On 8/3/07, Bo Peng <[EMAIL PROTECTED]> wrote: >> > I'd really prefer if possible >> > + par_language != latex_language && >> > >> > Don't commit now, I'll try to do basic testing when I am home. > > If this problem is taken care of, 1.5.1 is ready.
OK, I decided I do not like you patch :) The problem is that you fix one instance of code setting among about 8-10 in the file, and I have no idea why... I propose the following alternative approach: set the babel name of latex_lang to "", so that no language setting happens. This probably papers over another problem related to InsetListings dirty tricks (see how Listing caption is shown in typewriter font on screen), but I think it is a right thing to do by itself. Therefore I propose the following patch if it works for you. JMarc PS: BTW, is it really necessary to firce the encoding to latin1 before lstlisting? This is weird...
Index: src/Language.cpp =================================================================== --- src/Language.cpp (revision 19294) +++ src/Language.cpp (working copy) @@ -33,14 +33,14 @@ Language const * default_language; Language ignore_lang("ignore", "ignore", "Ignore", false, "", 0, "ignore", ""); Language const * ignore_language = &ignore_lang; -Language latex_lang("latex", "latex", "Latex", false, "", 0, "latex", ""); +Language latex_lang("latex", "", "Latex", false, "", 0, "latex", ""); Language const * latex_language = &latex_lang; void Languages::read(support::FileName const & filename) { // We need to set the encoding of latex_lang - latex_lang = Language("latex", "latex", "Latex", false, "iso8859-1", + latex_lang = Language("latex", "", "Latex", false, "iso8859-1", encodings.getFromLyXName("iso8859-1"), "latex", "");