diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index a22487469c..6139356f02 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -2625,7 +2625,8 @@ string BufferParams::babelCall(string const & lang_opts, bool const langoptions) if (lang_package != "auto" && lang_package != "babel" && lang_package != "default" && lang_package != "none") return lang_package; - if (lyxrc.language_package_selection == LyXRC::LP_CUSTOM) + if (lang_package == "default" + && lyxrc.language_package_selection == LyXRC::LP_CUSTOM) return lyxrc.language_custom_package; // suppress the babel call if there is no BabelName defined // for the document language in the lib/languages file and if no diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp index 236a7d3431..3f7226fed6 100644 --- a/src/LaTeXFeatures.cpp +++ b/src/LaTeXFeatures.cpp @@ -291,16 +291,14 @@ LaTeXFeatures::LaTeXFeatures(Buffer const & b, BufferParams const & p, bool LaTeXFeatures::useBabel() const { - if (usePolyglossia()) + if (usePolyglossia() + || bufferParams().lang_package == "none" + || (bufferParams().lang_package == "default" + && lyxrc.language_package_selection == LyXRC::LP_NONE)) return false; - if (bufferParams().lang_package == "default") - return (lyxrc.language_package_selection != LyXRC::LP_NONE) - || (bufferParams().language->lang() != lyxrc.default_language - && !bufferParams().language->babel().empty()) - || this->hasLanguages(); - return (bufferParams().lang_package != "none") - || (bufferParams().language->lang() != lyxrc.default_language - && !bufferParams().language->babel().empty()) + + return (bufferParams().language->lang() != lyxrc.default_language + && !bufferParams().language->babel().empty()) || this->hasLanguages(); } diff --git a/status.20x b/status.20x index 450591ce78..e82643d4ac 100644 --- a/status.20x +++ b/status.20x @@ -98,6 +98,8 @@ What's new - Fix babel call with Arabic (arabi). +- Fix suppression of language package. + * USER INTERFACE