+ if (it != spellers_.end()) {
+ Speller aspell = it->second;
+ if (lyxrc.spellchecker_accept_compound != aspell.accept_compound) {
+ // spell checker setting changed... adjust run-together
+ aspell.accept_compound = lyxrc.spellchecker_accept_compound;
+ if (aspell.accept_compound)
+ // Consider run-together words as legal compounds
+ aspell_config_replace(aspell.config, "run-together", "true");
+ else
+ // Report run-together words as errors
+ aspell_config_replace(aspell.config, "run-together", "false");
+ AspellCanHaveError * e_speller = aspell.e_speller;
+ aspell.e_speller = new_aspell_speller(aspell.config);
+ delete_aspell_speller(to_aspell_speller(e_speller));
+ spellers_[lang->lang()] = aspell;
+ }
+ return to_aspell_speller(aspell.e_speller);
+ }
+