http://bugzilla.lyx.org/show_bug.cgi?id=4408

The "accept compound words" option in Prefs currently only affects ispell. The 
attached patch implements it in aspell as well.

I commit to branch and trunk if I don't get objections.

Jürgen

P.S.: in trunk, the spellchecker is broken again.
Index: src/ASpell.cpp
===================================================================
--- src/ASpell.cpp	(Revision 22179)
+++ src/ASpell.cpp	(Arbeitskopie)
@@ -16,6 +16,7 @@
 #include <aspell.h>
 
 #include "ASpell_local.h"
+#include "LyXRC.h"
 #include "WordLangTuple.h"
 
 #include <boost/assert.hpp>
@@ -65,6 +66,12 @@
 	// platforms (cygwin, OS X). Therefore we use utf-8, that does
 	// always work.
 	aspell_config_replace(config, "encoding", "utf-8");
+	if (lyxrc.isp_accept_compound)
+		// Consider run-together words as legal compounds
+		aspell_config_replace(config, "run-together", "true");
+	else
+		// Report run-together words as errors
+		aspell_config_replace(config, "run-together", "false");
 	AspellCanHaveError * err = new_aspell_speller(config);
 	if (spell_error_object)
 		delete_aspell_can_have_error(spell_error_object);

Reply via email to