diff options
-rw-r--r-- | runtime/doc/spell.txt | 42 | ||||
-rw-r--r-- | runtime/doc/tags | 1 | ||||
-rw-r--r-- | runtime/spell/en.latin1.spl | bin | 562561 -> 561936 bytes | |||
-rw-r--r-- | src/spell/Makefile | 9 | ||||
-rw-r--r-- | src/testdir/test49.vim | 42 | ||||
-rw-r--r-- | src/version.h | 4 |
6 files changed, 73 insertions, 25 deletions
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index 3ec3c6252f..4c7a1a87ed 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -1,4 +1,4 @@ -*spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 17 +*spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -224,6 +224,11 @@ find them here: http://lingucomponent.openoffice.org/spell_dic.html You can also use a plain word list. +Make sure your current locale is set properly, otherwise Vim doesn't know what +characters are upper/lower case letters. If the locale isn't available (e.g., +when using an MS-Windows codepage on Unix) add tables to the .aff file +|spell-affix-chars|. + :mksp[ell][!] [-ascii] {outname} {inname} ... *:mksp* *:mkspell* Generate a Vim spell file word lists. Example: > :mkspell nl nl_NL.words @@ -429,6 +434,8 @@ something else, any encoding that "iconv" supports. The "SET" line must specify the name of the encoding. When using a multi-byte encoding it's possible to use more different affixes. + +CHARACTER TABLES *spell-affix-chars* When using an 8-bit encoding the affix file should define what characters are word characters (as specified with ENC). This is because the system where @@ -439,9 +446,9 @@ won't work. For example when using "cp1250" on Unix. *spell-affix-LOW* *spell-affix-UPP* Three lines in the affix file are needed. Simplistic example: - FOL áëñáëñ ~ - LOW áëñáëñ ~ - UPP áëñÁËÑ ~ + FOL áëñ ~ + LOW áëñ ~ + UPP ÁËÑ ~ All three lines must have exactly the same number of characters. @@ -465,11 +472,30 @@ otherwise they can't be combined without errors. The XX.ascii.spl spell file generated with the "-ascii" argument will not contain the table with characters, so that it can be combine with spell files for any encoding. + +AFFIXES *spell-affix-PFX* *spell-affix-SFX* -The usual PFX (prefix) and SFX (suffix) lines are supported. Note that -Myspell ignores any extra text after the relevant info. Vim requires this -text to start with a "#" so that mistakes don't go unnoticed. +The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell +documentation). Note that Myspell ignores any extra text after the relevant +info. Vim requires this text to start with a "#" so that mistakes don't go +unnoticed. Example: + + SFX F 0 in [^i]n # Spion > Spionin ~ + + *spell-affix-PFXPOSTPONE* +When an affix file has very many prefixes that apply to many words it's not +possible to build the whole word list in memory. This applies to Hebrew (a +list with all words is over a Gbyte). In that case applying prefixes must be +postponed. This makes spell checking slower. It is indicated by this keyword +in the .aff file: + PFXPOSTPONE ~ + +Only prefixes without a chop string can be postponed, prefixes with a chop +string will still be included in the word list. + + +KEEP-CASE WORDS *spell-affix-KEP* In the affix file a KEP line can be used to define the affix name used for keep-case words. Example: @@ -478,6 +504,8 @@ keep-case words. Example: See above for an example |spell-affix-vim|. + +RARE WORDS *spell-affix-RAR* In the affix file a RAR line can be used to define the affix name used for rare words. Example: diff --git a/runtime/doc/tags b/runtime/doc/tags index 72b8ba4207..7ec2e28258 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -6258,6 +6258,7 @@ spell-affix-KEP spell.txt /*spell-affix-KEP* spell-affix-LOW spell.txt /*spell-affix-LOW* spell-affix-MAP spell.txt /*spell-affix-MAP* spell-affix-PFX spell.txt /*spell-affix-PFX* +spell-affix-PFXPOSTPONE spell.txt /*spell-affix-PFXPOSTPONE* spell-affix-RAR spell.txt /*spell-affix-RAR* spell-affix-REP spell.txt /*spell-affix-REP* spell-affix-SAL spell.txt /*spell-affix-SAL* diff --git a/runtime/spell/en.latin1.spl b/runtime/spell/en.latin1.spl Binary files differindex 3ad72291e1..613016613d 100644 --- a/runtime/spell/en.latin1.spl +++ b/runtime/spell/en.latin1.spl diff --git a/src/spell/Makefile b/src/spell/Makefile index 5933d27e40..2ff2850a55 100644 --- a/src/spell/Makefile +++ b/src/spell/Makefile @@ -3,7 +3,7 @@ SPELLDIR = ../../runtime/spell VIM = ../vim -all: en +all: en pl nl de fr en: $(SPELLDIR)/en.latin1.spl \ $(SPELLDIR)/en.utf-8.spl \ @@ -21,6 +21,8 @@ de: $(SPELLDIR)/de.latin1.spl \ fr: $(SPELLDIR)/fr.latin1.spl \ $(SPELLDIR)/fr.utf-8.spl +he: $(SPELLDIR)/he.utf-8.spl + diff: -diff -a -C 1 en_US.orig.aff en_US.aff >en_US.diff -diff -a -C 1 en_US.orig.dic en_US.dic >>en_US.diff @@ -105,3 +107,8 @@ $(SPELLDIR)/fr.latin1.spl : $(VIM) \ $(SPELLDIR)/fr.utf-8.spl : $(VIM) \ fr_FR.aff fr_FR.dic env LANG=fr_FR.UTF-8 $(VIM) -e -c "mkspell! $(SPELLDIR)/fr fr_FR" -c q + + +$(SPELLDIR)/he.utf-8.spl : $(VIM) \ + he_IL.aff he_IL.dic + env LANG=he_IL.UTF-8 $(VIM) -e -c "mkspell! $(SPELLDIR)/he he_IL" -c q diff --git a/src/testdir/test49.vim b/src/testdir/test49.vim index 79a40c92e4..092c0c8098 100644 --- a/src/testdir/test49.vim +++ b/src/testdir/test49.vim @@ -1,6 +1,6 @@ " Vim script language tests " Author: Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com> -" Last Change: 2005 Jun 17 +" Last Change: 2005 Jun 18 "------------------------------------------------------------------------------- " Test environment {{{1 @@ -8049,7 +8049,13 @@ if ExtraVim() function! ERRabort(n) abort let g:taken = g:taken . "A" . a:n asdf - endfunction " returns -1 + endfunction " returns -1; may cause follow-up msg for illegal var/func name + + function! WRAP(n, arg) + let g:taken = g:taken . "W" . a:n + let g:saved_errmsg = v:errmsg + return arg + endfunction function! INT(n) let g:taken = g:taken . "I" . a:n @@ -8068,10 +8074,14 @@ if ExtraVim() function! MSG(n) let g:taken = g:taken . "M" . a:n - if (a:n >= 10 && a:n <= 27) ? v:errmsg != "" : v:errmsg !~ "asdf" - let g:taken = g:taken . v:errmsg + let errmsg = (a:n >= 37 && a:n <= 44) ? g:saved_errmsg : v:errmsg + let msgptn = (a:n >= 10 && a:n <= 27) ? "^$" : "asdf" + if errmsg !~ msgptn + let g:taken = g:taken . "x" + Xout "Expr" a:n.": Unexpected message:" v:errmsg endif let v:errmsg = "" + let g:saved_errmsg = "" endfunction let v:errmsg = "" @@ -8225,22 +8235,24 @@ if ExtraVim() let var = ERR(36) + CONT(36) call MSG(36) - let v{ERRabort(37) + CONT(37) . 'asdf'} = 0 + let saved_errmsg = "" + + let v{WRAP(37, ERRabort(37)) + CONT(37)} = 0 call MSG(37) - let v{ERRabort(38) + CONT(38) . 'asdf'} + let v{WRAP(38, ERRabort(38)) + CONT(38)} call MSG(38) - let var = exists('v{ERRabort(39) + CONT(39)}') + let var = exists('v{WRAP(39, ERRabort(39)) + CONT(39)}') call MSG(39) - unlet v{ERRabort(40) + CONT(40) . 'asdf'} + unlet v{WRAP(40, ERRabort(40)) + CONT(40)} call MSG(40) - function F{ERRabort(41) + CONT(41)}() + function F{WRAP(41, ERRabort(41)) + CONT(41)}() endfunction call MSG(41) - function F{ERRabort(42) + CONT(42)} + function F{WRAP(42, ERRabort(42)) + CONT(42)} call MSG(42) - let var = exists('*F{ERRabort(43) + CONT(43)}') + let var = exists('*F{WRAP(43, ERRabort(43)) + CONT(43)}') call MSG(43) - delfunction F{ERRabort(44) + CONT(44)} + delfunction F{WRAP(44, ERRabort(44)) + CONT(44)} call MSG(44) let var = ERRabort(45) + CONT(45) call MSG(45) @@ -8253,8 +8265,8 @@ if ExtraVim() \ . "T19M19T20M20T21M21T22M22T23M23T24M24T25M25T26M26T27M27" \ . "E28C28M28E29C29M29E30C30M30E31C31M31E32C32M32E33C33M33" \ . "E34C34M34E35C35M35E36C36M36" - \ . "A37C37M37A38C38M38A39C39M39A40C40M40A41C41M41A42C42M42" - \ . "A43C43M43A44C44M44A45C45M45" + \ . "A37W37C37M37A38W38C38M38A39W39C39M39A40W40C40M40A41W41C41M41" + \ . "A42W42C42M42A43W43C43M43A44W44C44M44A45C45M45" if taken != expected " The Xpath command does not accept 2^31 (negative); display explicitly: @@ -8270,7 +8282,7 @@ if ExtraVim() endif endif - unlet! var taken expected + unlet! v var saved_errmsg taken expected call delete(WA_t5) call delete(WA_t14) call delete(WA_t23) diff --git a/src/version.h b/src/version.h index 0afb2fdb60..3e32fc70c8 100644 --- a/src/version.h +++ b/src/version.h @@ -36,5 +36,5 @@ #define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_MEDIUM "7.0aa ALPHA" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 17)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 17, compiled " +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 19)" +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 19, compiled " |