diff options
Diffstat (limited to 'tex/context/base/lang-wrd.mkiv')
-rw-r--r-- | tex/context/base/lang-wrd.mkiv | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/tex/context/base/lang-wrd.mkiv b/tex/context/base/lang-wrd.mkiv index 6d8e28cd5..1408b7372 100644 --- a/tex/context/base/lang-wrd.mkiv +++ b/tex/context/base/lang-wrd.mkiv @@ -27,33 +27,28 @@ % \setupspellchecking[state=start,method=2] % ... % \typefile{\jobname.words} +% +% beware, maybe some day we will honour grouping +% +% 1: spell checking +% 2: word counting +% 3: language coloring -\def\loadspellchecklist - {\dodoubleempty\doloadspellchecklist} - -\def\doloadspellchecklist[#1][#2]% - {\ctxlua{languages.words.load("#1","#2")}} - -\unexpanded\def\setupspellchecking - {\dosingleargument\dosetupspellchecking} - -\newtoks\everysetupspellchecking +\installcorenamespace{spell} -\unexpanded\def\setupspellchecking[#1]% todo colors - {\getparameters[\??lw][#1]% - \the\everysetupspellchecking} +\installdirectcommandhandler \??spell {spellchecking} \appendtoks - \doifelse\@@lwstate\v!start - {\ctxlua{languages.words.enable { method = "\@@lwmethod", list = "\@@lwlist" }}} - {\ctxlua{languages.words.disable()}}% + \doifelse{\directspellcheckingparameter\c!state}\v!start + {\ctxcommand{enablespellchecking { method = "\directspellcheckingparameter\c!method", list = "\directspellcheckingparameter\c!list" }}} + {\ctxcommand{disablespellchecking()}}% \to \everysetupspellchecking -% beware, maybe some day we will honour grouping +\unexpanded\def\loadspellchecklist + {\dodoubleempty\languages_load_spell_check_list} -% 1: spell checking -% 2: word counting -% 3: language coloring +\def\languages_load_spell_check_list[#1][#2]% + {\ctxcommand{loadspellchecklist("#1","#2")}} \setupspellchecking [\c!state=\v!stop, |