summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runtime/doc/change.txt6
-rw-r--r--runtime/doc/develop.txt5
-rw-r--r--runtime/doc/map.txt13
-rw-r--r--runtime/doc/pattern.txt5
-rw-r--r--runtime/doc/spell.txt185
-rw-r--r--runtime/doc/syntax.txt5
-rw-r--r--runtime/doc/tags10
-rw-r--r--runtime/doc/todo.txt31
-rw-r--r--runtime/doc/version7.txt17
-rw-r--r--runtime/filetype.vim5
-rw-r--r--runtime/ftplugin/debchangelog.vim4
-rw-r--r--runtime/indent/php.vim2
-rw-r--r--runtime/spell/af/af_ZA.diff36
-rw-r--r--runtime/spell/af/main.aap79
-rw-r--r--runtime/spell/bg/bg_BG.diff42
-rw-r--r--runtime/spell/bg/main.aap79
-rw-r--r--runtime/spell/ca/ca_ES.diff76
-rw-r--r--runtime/spell/ca/main.aap81
-rw-r--r--runtime/spell/cs/cs_CZ.diff783
-rw-r--r--runtime/spell/cs/main.aap81
-rw-r--r--runtime/spell/da/main.aap78
-rw-r--r--runtime/spell/de/de_19.diff27
-rw-r--r--runtime/spell/de/de_20.diff28
-rw-r--r--runtime/spell/de/de_AT.diff44
-rw-r--r--runtime/spell/de/de_CH.diff27
-rw-r--r--runtime/spell/de/de_DE.diff4
-rw-r--r--runtime/spell/de/main.aap155
-rw-r--r--runtime/spell/en.ascii.splbin566599 -> 566601 bytes
-rw-r--r--runtime/spell/en.latin1.splbin568694 -> 568696 bytes
-rw-r--r--runtime/spell/en.utf-8.splbin569125 -> 569127 bytes
-rw-r--r--runtime/spell/en/main.aap58
-rw-r--r--runtime/spell/fr/main.aap20
-rw-r--r--runtime/spell/he/main.aap22
-rw-r--r--runtime/spell/hr/main.aap81
-rw-r--r--runtime/spell/it/main.aap16
-rw-r--r--runtime/spell/main.aap2
-rw-r--r--runtime/spell/nl/main.aap20
-rw-r--r--runtime/spell/ny/main.aap82
-rw-r--r--runtime/spell/pl/main.aap66
-rw-r--r--runtime/spell/sk/main.aap81
-rw-r--r--runtime/spell/sk/sk_SK.diff18
-rw-r--r--runtime/spell/yi/main.aap2
-rw-r--r--runtime/syntax/verilogams.vim142
-rw-r--r--src/ex_cmds.c12
-rw-r--r--src/ex_getln.c11
-rw-r--r--src/getchar.c10
-rw-r--r--src/mbyte.c4
-rw-r--r--src/regexp.c34
-rw-r--r--src/search.c9
-rw-r--r--src/spell.c408
-rw-r--r--src/structs.h5
-rw-r--r--src/undo.c6
-rw-r--r--src/version.h4
-rw-r--r--src/vim.h1
54 files changed, 2774 insertions, 248 deletions
diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt
index fc0b1c91f..3476ab229 100644
--- a/runtime/doc/change.txt
+++ b/runtime/doc/change.txt
@@ -1,4 +1,4 @@
-*change.txt* For Vim version 7.0aa. Last change: 2005 Jul 30
+*change.txt* For Vim version 7.0aa. Last change: 2005 Aug 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1534,4 +1534,8 @@ The details about sorting depend on the library function used. There is no
guarantee that sorting is "stable" or obeys the current locale. You will have
to try it out.
+The sorting itself cannot be interrupted, because of using a system library
+function. You can interrupt the preparation (for undo) and putting the sorted
+lines into the buffer. In the last case you may end up with duplicated lines.
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt
index dc3d69580..a640f5b3b 100644
--- a/runtime/doc/develop.txt
+++ b/runtime/doc/develop.txt
@@ -1,4 +1,4 @@
-*develop.txt* For Vim version 7.0aa. Last change: 2005 Jun 13
+*develop.txt* For Vim version 7.0aa. Last change: 2005 Aug 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -123,7 +123,8 @@ VIM IS... MAINTAINABLE *design-maintain*
- The source code should not become a mess. It should be reliable code.
- Use the same layout in all files to make it easy to read |coding-style|.
-- Use comments in a useful way!
+- Use comments in a useful way! Quoting the function name and argument names
+ is NOT useful. Do explain what they are for.
- Porting to another platform should be made easy, without having to change
too much platform-independent code.
- Use the object-oriented spirit: Put data and code together. Minimize the
diff --git a/runtime/doc/map.txt b/runtime/doc/map.txt
index 19a9d531c..de29f0fbc 100644
--- a/runtime/doc/map.txt
+++ b/runtime/doc/map.txt
@@ -273,6 +273,19 @@ with a space.
Note: When using mappings for Visual mode, you can use the "'<" mark, which
is the start of the last selected Visual area in the current buffer |'<|.
+ *:map-verbose*
+When 'verbose' is non-zero, listing a key map will also display where it was
+last defined. Example: >
+
+ :verbose map <C-W>*
+ n <C-W>* * <C-W><C-S>*
+ Last set from /home/abcd/.vimrc
+
+When the map was defined by hand there is no "Last set" message. When the map
+was defined while executing a function, user command or autocommand, the
+script in which it was defined is reported.
+{not available when compiled without the +eval feature}
+
*map_backslash*
Note that only CTRL-V is mentioned here as a special character for mappings
and abbreviations. When 'cpoptions' does not contain 'B', a backslash can
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index b99b0d7ab..078d75420 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 7.0aa. Last change: 2005 May 22
+*pattern.txt* For Vim version 7.0aa. Last change: 2005 Aug 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -944,6 +944,9 @@ x A single character, with no special meaning, matches itself
This makes it Vi compatible: Without the "\_" or "\n" the collection
does not match an end-of-line.
+ When the ']' is not there Vim will not give an error message but
+ assume no collection is used. Useful to search for '['.
+
If the sequence begins with "^", it matches any single character NOT
in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
- If two characters in the sequence are separated by '-', this is
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index 7d8a51a33..05252916a 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 Aug 12
+*spell.txt* For Vim version 7.0aa. Last change: 2005 Aug 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -195,6 +195,14 @@ regions. You can change that by manually editing the 'spellfile'. See
'spellfile' are only used when all entries in "spelllang" specify the same
region (not counting files specified by their .spl name).
+Specific exception: For German these special regions are used:
+ de all German words accepted
+ de_de old and new spelling
+ de_19 old spelling
+ de_20 new spelling
+ de_at Austria
+ de_ch Switzerland
+
SPELL FILES *spell-load*
@@ -335,6 +343,27 @@ they do: >
Note that the default scripts don't set 'spellcapcheck' if it was changed from
the default value. This assumes the user prefers another value then.
+
+DOUBLE SCORING *spell-double-scoring*
+
+The 'spellsuggest' option can be used to select "double" scoring. This
+mechanism is based on the principle that there are two kinds of spelling
+mistakes:
+
+1. You know how to spell the word, but mistype something. This results in a
+ small editing distance (character swapped/omitted/inserted) and possibly a
+ word that sounds completely different.
+
+2. You don't know how to spell the word and type something that sounds right.
+ The edit distance can be big but the word is similar after sound-folding.
+
+Since scores for these two mistakes will be very different we use a list
+for each and mix them.
+
+The sound-folding is slow and people that know the language won't make the
+second kind of mistakes. Therefore 'spellsuggest' can be set to select the
+preferred method for scoring the suggestions.
+
==============================================================================
3. Generating a spell file *spell-mkspell*
@@ -409,6 +438,11 @@ then Vim will try to guess.
and producing an output file in the same directory
that has ".{enc}.spl" appended.
+Vim will report the number of duplicate words. This might be a mistake in the
+list of words. But sometimes it is used to have different prefixes and
+suffixes for the same basic word to avoid them combining (e.g. Czech uses
+this).
+
Since you might want to change a Myspell word list for use with Vim the
following procedure is recommended:
@@ -716,9 +750,27 @@ string is one character and equal to the last character of the added string,
but in lower case. Thus when the chop string is used to allow the following
word to start with an upper case letter.
+It is not possible to use PFXPOSTPONE together with COMPOUNDFLAG or
+COMPOUNDFLAGS.
+
+
+WORDS WITH A SLASH *spell-affix-SLASH*
+
+The slash is used in the .dic file to separate the basic word from the affix
+letters that can be used. Unfortunately, this means you cannot use a slash in
+a word. Thus "TCP/IP" cannot be a word. To work around that you can define a
+replacement character for the slash. Example:
+
+ SLASH , ~
+
+Now you can use "TCP,IP" to add the word "TCP/IP".
+
+Of course, the letter used should itself not appear in any word! The letter
+must be ASCII, thus a single byte.
+
+
+KEEP-CASE WORDS *spell-affix-KEP*
-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:
@@ -727,8 +779,8 @@ keep-case words. Example:
See above for an example |spell-affix-vim|.
-RARE WORDS
- *spell-affix-RAR*
+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:
@@ -740,8 +792,8 @@ a typing mistake anyway. When the same word is found as good it won't be
highlighted as rare.
-BAD WORDS
- *spell-affix-BAD*
+BAD WORDS *spell-affix-BAD*
+
In the affix file a BAD line can be used to define the affix name used for
bad words. Example:
@@ -756,6 +808,125 @@ Once a word has been marked as bad it won't be undone by encountering the same
word as good.
+COMPOUND WORDS *spell-affix-compound*
+
+A compound word is a longer word made by concatenating words. To specify
+which words may be concatenated a character is used. This character is put in
+the list of affixes after the word. We will call this character a flag here.
+Obviously these flags must be different from any affix IDs used.
+
+ *spell-COMPOUNDFLAG*
+The Myspell compatible method uses one flag, specified with COMPOUNDFLAG.
+All words with this flag combine in any order and without limit in length.
+This means there is no control over which word comes first. Example:
+ COMPOUNDFLAG c ~
+
+ *spell-COMPOUNDFLAGS*
+The method added by Vim allows specifying which words can be prepended to
+other words, and which words can be appended to other words. This is a list
+of comma separated items. Each item may contain zero or more dashes and plus
+signs.
+
+NOTE: At this moment COMPOUNDFLAGS has not been implemented yet!
+
+An item without dashes specifies words that combine in any order and as often
+as possible. Example:
+ COMPOUNDFLAGS c,m ~
+
+This allows all words with the "c" flag to be combined and all words with the
+"m" flag to be combined, but a word with the "c" flag doesn't combine with a
+word with the "m" flag.
+
+Flags that are put together, without a separating comma, are considered
+interchangable. Example:
+ COMPOUNDFLAGS cm ~
+
+This allows all words with the "c" and/or "m" flag to be combined.
+
+An item with one dash specifies flags for a leading word and flags for a
+trailing word. Thus only two-word combinations are made. Example:
+ COMPOUNDFLAGS f-d ~
+
+Here the 'f' flag can be used for food and 'd' for dishes, such that you can
+use these words in the dictionary:
+ tomato/f ~
+ onion/f~
+ soup/d~
+ salat/d~
+
+Which makes the words:
+ tomato
+ onion
+ soup
+ salat
+ tomatosoup
+ tomatosalat
+ onionsoup
+ onionsalat
+
+Note that something like "souptomato" is not possible. And that it's actually
+easier to list all the words if you have only this few.
+
+More dashes can be used to allow more words to combine. For example:
+ COMPOUNDFLAGS f-d,f-f-d ~
+
+Would allow "tomatoonionsoup" (OK, so this is a bad example, but you get the
+idea).
+
+When a word can be used an undetermined number of times use a plus instead of
+a dash. Example:
+ COMPOUNDFLAGS f+d ~
+
+Then you can make tasty "oniononiontomatotomatosoup".
+
+The "+" may also appear at the end, which means that the last flags can be
+repeated many times. Example:
+ COMPOUNDFLAGS f-d+ ~
+
+Which allows the use of "onionsoupsoupsoupsoupsoupsoup".
+
+ *spell-COMPOUNDMIN*
+The minimal length of a word used for concatenation is specified with
+COMPOUNDMIN. Example:
+ COMPOUNDMIN 5 ~
+
+When omitted a minimal length of 3 bytes is used. Obviously you could just
+leave out the compound flag from short words instead, this feature is present
+for compatibility with Myspell.
+
+ *spell-CMP*
+NOTE: At this moment CMP has not been implemented yet!
+
+Sometimes it is necessary to change a word when concatenating it to another,
+by removing a few letters, inserting something or both. It can also be useful
+to restrict concatenation to words that match a pattern. For this purpose CMP
+items can be used. They look like this:
+ CMP {flag} {strip} {add} {cond} {cond2}
+
+ {flag} the flag, as used in COMPOUNDFLAGS for the lead word
+ {strip} text to remove from the end of the lead word (zero
+ for no stripping)
+ {add} text to insert between the words (zero for no
+ addition)
+ {cond} condition to match at the end of the lead word
+ {cond2} condition to match at the start of the following word
+
+This is exactly the same as what is used for SFX and PFX items, except there
+is an extra condition. Example:
+ CMP f 0 - . . ~
+
+When used with the food and dish word list above, this means that a dash is
+inserted after each food item. Thus you get "onion-soup" and
+"onion-tomato-salat".
+
+When there are CMP items for a compound flag the concatenation is only done
+when a CMP item matches.
+
+When there are no CMP items for a compound flag, then all words will be
+concatenated, as if there was an item:
+ CMP {flag} 0 0 . .
+
+
REPLACEMENTS *spell-affix-REP*
In the affix file REP items can be used to define common mistakes. This is
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index 3643f7aa0..04e76dbef 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.0aa. Last change: 2005 Aug 11
+*syntax.txt* For Vim version 7.0aa. Last change: 2005 Aug 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2234,7 +2234,7 @@ vimrc file: >
(Adapted from the html.vim help text by Claudio Fleiner <claudio@fleiner.com>)
-SH *sh.vim* *sh-syntax*
+SH *sh.vim* *sh-syntax* *bash-syntax* *ksh-syntax*
This covers the "normal" Unix (Bourne) sh, bash and the Korn shell.
@@ -3647,6 +3647,7 @@ specified field is used, and settings are merged with previous ones. So, the
result is like this single command has been used: >
:hi Comment term=bold ctermfg=Cyan guifg=#80a0ff gui=bold
<
+ *:highlight-verbose*
When listing a highlight group and 'verbose' is non-zero, the listing will
also tell where it was last set. Example: >
:verbose hi Comment
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 13f307337..18f60888b 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -2014,6 +2014,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:highlight-default syntax.txt /*:highlight-default*
:highlight-link syntax.txt /*:highlight-link*
:highlight-normal syntax.txt /*:highlight-normal*
+:highlight-verbose syntax.txt /*:highlight-verbose*
:history cmdline.txt /*:history*
:history-indexing cmdline.txt /*:history-indexing*
:i insert.txt /*:i*
@@ -2124,6 +2125,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
:map-silent map.txt /*:map-silent*
:map-special-keys map.txt /*:map-special-keys*
:map-undo map.txt /*:map-undo*
+:map-verbose map.txt /*:map-verbose*
:map_l map.txt /*:map_l*
:map_l! map.txt /*:map_l!*
:mapc map.txt /*:mapc*
@@ -4242,6 +4244,7 @@ balloon-eval debugger.txt /*balloon-eval*
bar motion.txt /*bar*
bars help.txt /*bars*
base_font_name_list mbyte.txt /*base_font_name_list*
+bash-syntax syntax.txt /*bash-syntax*
basic-syntax syntax.txt /*basic-syntax*
basic.vim syntax.txt /*basic.vim*
beep options.txt /*beep*
@@ -5205,7 +5208,6 @@ hebrew hebrew.txt /*hebrew*
hebrew.txt hebrew.txt /*hebrew.txt*
help various.txt /*help*
help-context help.txt /*help-context*
-help-tags tags 1
help-translated various.txt /*help-translated*
help-xterm-window various.txt /*help-xterm-window*
help.txt help.txt /*help.txt*
@@ -5532,6 +5534,7 @@ keypad-plus intro.txt /*keypad-plus*
keypad-point intro.txt /*keypad-point*
keys() eval.txt /*keys()*
known-bugs todo.txt /*known-bugs*
+ksh-syntax syntax.txt /*ksh-syntax*
l motion.txt /*l*
l:var eval.txt /*l:var*
lace-syntax syntax.txt /*lace-syntax*
@@ -6372,6 +6375,9 @@ spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
special-buffers windows.txt /*special-buffers*
speed-up tips.txt /*speed-up*
spell spell.txt /*spell*
+spell-COMPOUNDFLAG spell.txt /*spell-COMPOUNDFLAG*
+spell-COMPOUNDFLAGS spell.txt /*spell-COMPOUNDFLAGS*
+spell-COMPOUNDMIN spell.txt /*spell-COMPOUNDMIN*
spell-affix-BAD spell.txt /*spell-affix-BAD*
spell-affix-FOL spell.txt /*spell-affix-FOL*
spell-affix-KEP spell.txt /*spell-affix-KEP*
@@ -6383,10 +6389,12 @@ spell-affix-RAR spell.txt /*spell-affix-RAR*
spell-affix-REP spell.txt /*spell-affix-REP*
spell-affix-SAL spell.txt /*spell-affix-SAL*
spell-affix-SFX spell.txt /*spell-affix-SFX*
+spell-affix-SLASH spell.txt /*spell-affix-SLASH*
spell-affix-SOFOFROM spell.txt /*spell-affix-SOFOFROM*
spell-affix-SOFOTO spell.txt /*spell-affix-SOFOTO*
spell-affix-UPP spell.txt /*spell-affix-UPP*
spell-affix-chars spell.txt /*spell-affix-chars*
+spell-affix-compound spell.txt /*spell-affix-compound*
spell-affix-mbyte spell.txt /*spell-affix-mbyte*
spell-affix-vim spell.txt /*spell-affix-vim*
spell-dic-format spell.txt /*spell-dic-format*
diff --git a/runtime/doc/todo.txt b/runtime/doc/todo.txt
index 8397b77af..1f82ecc1a 100644
--- a/runtime/doc/todo.txt
+++ b/runtime/doc/todo.txt
@@ -1,4 +1,4 @@
-*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 12
+*todo.txt* For Vim version 7.0aa. Last change: 2005 Aug 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,11 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
*known-bugs*
-------------------- Known bugs and current work -----------------------
+Spelling:
+- suggestions for compound words.
+- Implement multiple flags for compound words. Await comments from other
+ spell checking authors.
+
Mac unicode patch (Da Woon Jung):
- selecting proportional font breaks display
- UTF-8 text causes display problems. Font replacement causes this.
@@ -77,12 +82,26 @@ PLANNED FOR VERSION 7.0:
Use something like 'completefunc'?
runtime/complete/{filetype}.vim files?
In function arguments suggest variables of expected type.
+ List of completions is a Dictionary with items:
+ complist[0]['text'] = completion text
+ complist[0]['type'] = type of completion (e.g. function, var, arg)
+ complist[0]['help'] = help text (e.g. function declaration)
+ complist[0]['helpfunc'] = function that shows help text
+ etc.
Ideas from others:
http://www.vim.org/scripts/script.php?script_id=747
+ http://sourceforge.net/projects/insenvim
+ of http://insenvim.sourceforge.net
+ Java, XML, HTML, C++, JSP, SQL, C#
+ MS-Windows only, lots of dependencies (e.g. Perl, Internet
+ explorer), uses .dll shared libraries.
+ for C++ uses $INCLUDE environment var
+ UI: popup menu with list of alternatives, icon to indicate type
+ optional popup window with info about selected alternative
+ Unrelated settings are changed (e.g. 'mousemodel').
+
www.vim.org script 1213 (Java Development Environment) (Fuchuan Wang)
- http://sourceforge.net/projects/insenvim
- of http://insenvim.sourceforge.net
IComplete: http://www.vim.org/scripts/script.php?script_id=1265
and http://stud4.tuwien.ac.at/~e0125672/icomplete/
http://cedet.sourceforge.net/intellisense.shtml (for Emacs)
@@ -2571,16 +2590,12 @@ More advanced repeating commands:
Mappings and Abbreviations:
-8 Let ":verbose map xx" report where the mapping was set, just like with
- ":verbose set".
8 When "0" is mapped (it is a movement command) this mapping should not be
used after typing another number, e.g. "20l". (Charles Campbell)
Is this possible without disabling the mapping of the following command?
8 Should mapping <C-A> and <C-S-A> both work?
7 ":abbr b byte", append "b " to an existing word still expands to "byte".
This is Vi compatible, but can we avoid it anyway?
-8 ":verbose map" could show the script where the mapping was defined.
- m_script_ID can be used.
8 To make a mapping work with a prepended "x to select a register, store the
last _typed_ register name and access it with "&.
8 Add ":amap", like ":amenu".
@@ -2592,8 +2607,6 @@ Mappings and Abbreviations:
8 Allow mapping of CTRL-@ (anywhere in the LHS).
8 Give a warning when using CTRL-C in the lhs of a mapping. It will never
(?) work.
-7 ":verbose map" should display where a mapping was defined, like ":verbose
- set".
8 Add a way to save a current mapping and restore it later. Use a function
that returns the mapping command to restore it: mapcmd()? mapcheck() is
not fool proof. How to handle ambiguous mappings?
diff --git a/runtime/doc/version7.txt b/runtime/doc/version7.txt
index 12f5ddf68..a1c537fd6 100644
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt* For Vim version 7.0aa. Last change: 2005 Aug 12
+*version7.txt* For Vim version 7.0aa. Last change: 2005 Aug 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -559,6 +559,11 @@ when the buffer does not have a name or no specific name. See
For xterm most combinations of modifiers with function keys are recognized.
|xterm-modifier-keys|
+When 'verbose' is set the output of ":highlight" will show where a highlight
+item was last set.
+When 'verbose' is set the output of ":map" will show where a key map was
+last defined. (Yegappan Lakshmanan)
+
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -740,6 +745,7 @@ pointer position instead of the text cursor.
The table with encodings has been expanded with many MS-Windows codepages,
such as cp1250 and cp737, so that these can also be used on Unix without
prepending "8bit-".
+When an encoding name starts with "microsoft-cp" ignore the "microsoft-" part.
Added the "customlist" completion argument to a user-defined command. The
user-defined completion function should return the completion candidates as a
@@ -752,9 +758,6 @@ Win32: Balloons can have multiple lines if common controls supports it.
The 's' flag is added to the search() and searchpair() function to set the
' mark if the cursor is moved. (Yegappan Lakshmanan)
-When 'verbose' is set the output of ":highlight" will show where a highlight
-item was last set.
-
For 'errorformat' it was not possible to have a file name that contains the
character that follows after "%f". For example, in "%f:%l:%m" the file name
could not contain ":". Now include the first ":" where the rest of the
@@ -1283,4 +1286,10 @@ were not set.
Win32: Could not use "**/" in 'path', it had to be "**\".
+The search pattern "\n" did not match at the end of the last line.
+
+Searching for a pattern backwards, starting on the NUL at the end of the line
+and 'encoding' is "utf-8" would match the pattern just before it incorrectly.
+Affected searchpair('/\*', '', '\*/').
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index d8fd0af52..560c479d2 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2005 Jul 13
+" Last Change: 2005 Aug 15
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1700,6 +1700,9 @@ au BufNewFile,BufRead /etc/updatedb.conf setf updatedb
" Verilog HDL
au BufNewFile,BufRead *.v setf verilog
+" Verilog-AMS HDL
+au BufNewFile,BufRead *.va,*.vams setf verilogams
+
" VHDL
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
diff --git a/runtime/ftplugin/debchangelog.vim b/runtime/ftplugin/debchangelog.vim
index 32db5a73d..59f601ad0 100644
--- a/runtime/ftplugin/debchangelog.vim
+++ b/runtime/ftplugin/debchangelog.vim
@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Debian Changelog
" Maintainer: Michael Piefel <piefel@informatik.hu-berlin.de>
-" Last Change: 23 March 2004
+" Last Change: 15 August 2005
if exists("g:did_changelog_ftplugin")
finish
@@ -30,7 +30,7 @@ function <SID>Email()
elseif exists("$EMAIL")
return $EMAIL
elseif exists("g:debianemail")
- return g:debianfullemail
+ return g:debianemail
else
return "your@email.address"
endif
diff --git a/runtime/indent/php.vim b/runtime/indent/php.vim
index 7f7aa56bc..3e7a99023 100644
--- a/runtime/indent/php.vim
+++ b/runtime/indent/php.vim
@@ -2,7 +2,7 @@
" Language: PHP
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
-" Last Change: 2005 June 30th
+" Last Change: 2005 Aug 15
" Version: 1.17
"
" For a complete change log and lots of comments in the code, download the script on
diff --git a/runtime/spell/af/af_ZA.diff b/runtime/spell/af/af_ZA.diff
new file mode 100644
index 000000000..9c85804ff
--- /dev/null
+++ b/runtime/spell/af/af_ZA.diff
@@ -0,0 +1,36 @@
+*** af_ZA.orig.aff Sun Aug 14 17:37:01 2005
+--- af_ZA.aff Sun Aug 14 17:38:11 2005
+***************
+*** 23,24 ****
+--- 23,34 ----
+
++ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
++
++ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
++ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
++
++ MIDWORD '-
++ SLASH ,
++
+ MAP 3
+*** af_ZA.orig.dic Sun Aug 14 17:37:01 2005
+--- af_ZA.dic Sun Aug 14 17:38:54 2005
+***************
+*** 1861,1864 ****
+ T-skyf
+! TCP/IP
+! TCP/IP-bondel
+ TLA
+--- 1861,1864 ----
+ T-skyf
+! TCP,IP
+! TCP,IP-bondel
+ TLA
+***************
+*** 124109,124111 ****
+ vrywilliglik
+- vt
+ vuile/R
+--- 124109,124110 ----
diff --git a/runtime/spell/af/main.aap b/runtime/spell/af/main.aap
new file mode 100644
index 000000000..d393c5fe6
--- /dev/null
+++ b/runtime/spell/af/main.aap
@@ -0,0 +1,79 @@
+# Aap recipe for Afrikaans Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+SPELLDIR = ..
+FILES = af_ZA.aff af_ZA.dic
+
+all: $SPELLDIR/af.latin1.spl $SPELLDIR/af.utf-8.spl ../README_af.txt
+
+$SPELLDIR/af.latin1.spl : $VIM $FILES
+ :sys env LANG=af_ZA.ISO8859-1
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/af af_ZA" -c q
+
+$SPELLDIR/af.utf-8.spl : $VIM $FILES
+ :sys env LANG=af_ZA.UTF-8
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/af af_ZA" -c q
+
+../README_af.txt : README_af_ZA.txt
+ :copy $source $target
+
+#
+# Fetching the file from SourceForge. The archive at OpenOffice is broken!
+#
+FILE = http://surfnet.dl.sourceforge.net/sourceforge/translate/myspell-af_ZA-20040727.zip
+
+:attr {fetch = $FILE} af_ZA.zip
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+af_ZA.aff af_ZA.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch af_ZA.zip
+ :sys $UNZIP af_ZA.zip
+ :delete af_ZA.zip
+ @if not os.path.exists('af_ZA.orig.aff'):
+ :copy af_ZA.aff af_ZA.orig.aff
+ @if not os.path.exists('af_ZA.orig.dic'):
+ :copy af_ZA.dic af_ZA.orig.dic
+ @if os.path.exists('af_ZA.diff'):
+ :sys patch <af_ZA.diff
+
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+ :assertpkg diff
+ :sys {force} diff -a -C 1 af_ZA.orig.aff af_ZA.aff >af_ZA.diff
+ :sys {force} diff -a -C 1 af_ZA.orig.dic af_ZA.dic >>af_ZA.diff
+
+
+# Check for updated OpenOffice spell files. When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+ :assertpkg unzip diff
+ :fetch af_ZA.zip
+ :mkdir tmp
+ :cd tmp
+ @try:
+ @import stat
+ :sys $UNZIP ../af_ZA.zip
+ :sys {force} diff ../af_ZA.orig.aff af_ZA.aff >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy af_ZA.aff ../af_ZA.new.aff
+ :sys {force} diff ../af_ZA.orig.dic af_ZA.dic >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy af_ZA.dic ../af_ZA.new.dic
+ @finally:
+ :cd ..
+ :delete {r}{f}{q} tmp
+ :delete af_ZA.zip
+
+
+# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/bg/bg_BG.diff b/runtime/spell/bg/bg_BG.diff
new file mode 100644
index 000000000..da0a4f349
--- /dev/null
+++ b/runtime/spell/bg/bg_BG.diff
@@ -0,0 +1,42 @@
+*** bg_BG.orig.aff Sun Aug 14 18:12:44 2005
+--- bg_BG.aff Sun Aug 14 18:13:12 2005
+***************
+*** 1,2 ****
+! SET microsoft-cp1251
+ TRY àåíîèðòâñëêìïçäÿóúá÷ãöæõøôéùþüÀÅÍÎÈÐÒÂÑËÊÌÏÇÄßÓÚÁ×ÃÖÆÕØÔÉÙÞÜ
+--- 1,2 ----
+! SET cp1251
+ TRY àåíîèðòâñëêìïçäÿóúá÷ãöæõøôéùþüÀÅÍÎÈÐÒÂÑËÊÌÏÇÄßÓÚÁ×ÃÖÆÕØÔÉÙÞÜ
+***************
+*** 1682,1684 ****
+
+! MAP 26
+ MAP àúüa
+--- 1682,1684 ----
+
+! MAP 25
+ MAP àúüa
+***************
+*** 1691,1695 ****
+ MAP æø
+! MAP çñ
+ MAP pð
+- MAP cñ
+ MAP xõ
+--- 1691,1694 ----
+ MAP æø
+! MAP cçñ
+ MAP pð
+ MAP xõ
+***************
+*** 1707,1709 ****
+ MAP PÐ
+- MAP YÓ
+ MAP XÕ
+--- 1706,1711 ----
+ MAP PÐ
+ MAP XÕ
++
++ REP 2
++ REP Y Ó
++ REP Ó Y
diff --git a/runtime/spell/bg/main.aap b/runtime/spell/bg/main.aap
new file mode 100644
index 000000000..7849526ed
--- /dev/null
+++ b/runtime/spell/bg/main.aap
@@ -0,0 +1,79 @@
+# Aap recipe for Czech Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+SPELLDIR = ..
+FILES = bg_BG.aff bg_BG.dic
+
+all: $SPELLDIR/bg.cp1251.spl $SPELLDIR/bg.utf-8.spl ../README_bg.txt
+
+$SPELLDIR/bg.cp1251.spl : $VIM $FILES
+ :sys env LANG=bg_BG.CP1251 $VIM -u NONE -e -c "mkspell! $SPELLDIR/bg bg_BG" -c q
+
+$SPELLDIR/bg.utf-8.spl : $VIM $FILES
+ :sys env LANG=bg_BG.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/bg bg_BG" -c q
+
+../README_bg.txt: README_bg_BG.txt
+ :copy $source $target
+
+#
+# Fetching the files from OpenOffice.org.
+#
+OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
+:attr {fetch = $OODIR/%file%} bg_BG.zip
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+# This is a bit tricky, since the file name includes the date.
+bg_BG.aff bg_BG.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch bg_BG.zip
+ :sys $UNZIP bg_BG.zip
+ :delete bg_BG.zip
+ :sys $VIM bg_BG.aff -c "set ff=unix" -c "update" -c q
+ :sys $VIM bg_BG.dic -c "set ff=unix" -c "update" -c q
+ @if not os.path.exists('bg_BG.orig.aff'):
+ :copy bg_BG.aff bg_BG.orig.aff
+ @if not os.path.exists('bg_BG.orig.dic'):
+ :copy bg_BG.dic bg_BG.orig.dic
+ @if os.path.exists('bg_BG.diff'):
+ :sys patch <bg_BG.diff
+
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+ :assertpkg diff
+ :sys {force} diff -a -C 1 bg_BG.orig.aff bg_BG.aff >bg_BG.diff
+ :sys {force} diff -a -C 1 bg_BG.orig.dic bg_BG.dic >>bg_BG.diff
+
+
+# Check for updated OpenOffice spell files. When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+ :assertpkg unzip diff
+ :fetch bg_BG.zip
+ :mkdir tmp
+ :cd tmp
+ @try:
+ @import stat
+ :sys $UNZIP ../bg_BG.zip
+ :sys {force} diff ../bg_BG.orig.aff bg_BG.aff >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy bg_BG.aff ../bg_BG.new.aff
+ :sys {force} diff ../bg_BG.orig.dic bg_BG.dic >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy bg_BG.dic ../bg_BG.new.dic
+ @finally:
+ :cd ..
+ :delete {r}{f}{q} tmp
+ :delete bg_BG.zip
+
+
+# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/ca/ca_ES.diff b/runtime/spell/ca/ca_ES.diff
new file mode 100644
index 000000000..dda3b0a5c
--- /dev/null
+++ b/runtime/spell/ca/ca_ES.diff
@@ -0,0 +1,76 @@
+*** ca_ES.orig.aff Sat Aug 13 18:01:36 2005
+--- ca_ES.aff Sat Aug 13 18:01:32 2005
+***************
+*** 44,48 ****
+
+! # substitucions preferides
+! FIRST a/à e/é/è é/è/e è/é/e i/í/ï í/i/ï o/ó/ò ó/ò/o ò/ó/o u/ú/ü ú/u/ü ü/u/ú
+! FIRST l/l·l l·l/l
+
+--- 44,65 ----
+
+! FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
+! LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
+! UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
+!
+! SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
+! SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
+!
+! MIDWORD ·-'
+!
+! MAP 6
+! MAP aàáâãäå
+! MAP eèéêë
+! MAP iìíîï
+! MAP oòóôõö
+! MAP uùúûü
+! MAP cç
+!
+! REP 2
+! REP l l·l
+! REP l·l l
+
+*** ca_ES.orig.dic Sat Aug 13 18:01:55 2005
+--- ca_ES.dic Sat Aug 13 18:01:51 2005
+***************
+*** 25312,25314 ****
+ caos/E
+- cap
+ cap-rodo/E
+--- 25312,25313 ----
+***************
+*** 35103,35105 ****
+ corrasió/G
+- corre
+ corre-corrents
+--- 35102,35103 ----
+***************
+*** 99806,99808 ****
+ majúscul/F
+- mal
+ mal-llevat/E
+--- 99804,99805 ----
+***************
+*** 107517,107519 ****
+ notòriament
+- nou
+ nou-centes/E
+--- 107514,107515 ----
+***************
+*** 122687,122689 ****
+ ratània/E
+- rau
+ rau-rau/E
+--- 122683,122684 ----
+***************
+*** 139389,139391 ****
+ taüt/E
+- te
+ te'l
+--- 139384,139385 ----
+***************
+*** 147590,147592 ****
+ vitícola/E
+- viu
+ viu-viu/E
+--- 147584,147585 ----
diff --git a/runtime/spell/ca/main.aap b/runtime/spell/ca/main.aap
new file mode 100644
index 000000000..b2f7350b6
--- /dev/null
+++ b/runtime/spell/ca/main.aap
@@ -0,0 +1,81 @@
+# Aap recipe for Catelan (Spain) Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+SPELLDIR = ..
+FILES = ca_ES.aff ca_ES.dic
+
+all: $SPELLDIR/ca.latin1.spl $SPELLDIR/ca.utf-8.spl ../README_ca.txt
+
+$SPELLDIR/ca.latin1.spl : $VIM $FILES
+ :sys env LANG=ca_ES.ISO8859-1
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/ca ca_ES" -c q
+
+$SPELLDIR/ca.utf-8.spl : $VIM $FILES
+ :sys env LANG=ca_ES.UTF-8
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/ca ca_ES" -c q
+
+../README_ca.txt : README_ca_ES.txt
+ :copy $source $target
+
+#
+# Fetching the files from OpenOffice.org.
+#
+OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
+:attr {fetch = $OODIR/%file%} ca_ES.zip
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+# Make sure the files are in Unix fileformat
+ca_ES.aff ca_ES.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch ca_ES.zip
+ :sys $UNZIP ca_ES.zip
+ :delete ca_ES.zip
+ :sys $VIM ca_ES.aff -c "set ff=unix" -c "update" -c q
+ :sys $VIM ca_ES.dic -c "set ff=unix" -c "update" -c q
+ @if not os.path.exists('ca_ES.orig.aff'):
+ :copy ca_ES.aff ca_ES.orig.aff
+ @if not os.path.exists('ca_ES.orig.dic'):
+ :copy ca_ES.dic ca_ES.orig.dic
+ @if os.path.exists('ca_ES.diff'):
+ :sys patch <ca_ES.diff
+
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+ :assertpkg diff
+ :sys {force} diff -a -C 1 ca_ES.orig.aff ca_ES.aff >ca_ES.diff
+ :sys {force} diff -a -C 1 ca_ES.orig.dic ca_ES.dic >>ca_ES.diff
+
+
+# Check for updated OpenOffice spell files. When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+ :assertpkg unzip diff
+ :fetch ca_ES.zip
+ :mkdir tmp
+ :cd tmp
+ @try:
+ @import stat
+ :sys $UNZIP ../ca_ES.zip
+ :sys {force} diff ../ca_ES.orig.aff ca_ES.aff >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy ca_ES.aff ../ca_ES.new.aff
+ :sys {force} diff ../ca_ES.orig.dic ca_ES.dic >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy ca_ES.dic ../ca_ES.new.dic
+ @finally:
+ :cd ..
+ :delete {r}{f}{q} tmp
+ :delete ca_ES.zip
+
+
+# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/cs/cs_CZ.diff b/runtime/spell/cs/cs_CZ.diff
new file mode 100644
index 000000000..40a84ef84
--- /dev/null
+++ b/runtime/spell/cs/cs_CZ.diff
@@ -0,0 +1,783 @@
+*** cs_CZ.orig.aff Sat Aug 13 21:38:29 2005
+--- cs_CZ.aff Sat Aug 13 23:29:13 2005
+***************
+*** 3,4 ****
+--- 3,8 ----
+
++ FOL ±¢³µ¶¨¹º»¼¾¿±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ LOW ±¢³µ¶¨¹º»¼¾¿±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ UPP ¡¢£¥¦¨©ª«¬®¯±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
++
+ PFX N Y 1
+***************
+*** 2118,2120 ****
+ SFX A nout ly [aeiouyáéíóúýùì]rnout
+! SFX A nout l [aeiouyáéíóúýùìr][^aeiouyáéíóúýùìrl][^aeiouy
+ SFX A nout l [aeiouyáéíóúýùìr][^aeiouyáéíóúýùìrl]nout
+--- 2122,2124 ----
+ SFX A nout ly [aeiouyáéíóúýùì]rnout
+! SFX A nout l [aeiouyáéíóúýùìr][^aeiouyáéíóúýùìrl][^aeiouy]out
+ SFX A nout l [aeiouyáéíóúýùìr][^aeiouyáéíóúýùìrl]nout
+*** cs_CZ.orig.dic Sat Aug 13 21:38:29 2005
+--- cs_CZ.dic Sun Aug 14 15:33:38 2005
+***************
+*** 2944,2946 ****
+ ar/H
+- arch
+ archaický/YCRN
+--- 2944,2945 ----
+***************
+*** 3098,3100 ****
+ arogantní/YKRN
+- aroma
+ aroma/K
+--- 3097,3098 ----
+***************
+*** 4753,4755 ****
+ banjo/MQ
+- bank
+ banka/ZQ
+--- 4751,4752 ----
+***************
+*** 5540,5542 ****
+ Bechyòákùv/Y
+- Bechynì
+ Bechynì/S
+--- 5537,5538 ----
+***************
+*** 5945,5947 ****
+ bermudský/YRN
+- Bermudy
+ Bermudy/ZQ
+--- 5941,5942 ----
+***************
+*** 6111,6113 ****
+ Beustùv/Y
+- bez
+ Bezáková/Y
+--- 6106,6107 ----
+***************
+*** 7294,7296 ****
+ blána/Z
+- Blanc
+ Blanc/PV
+--- 7288,7289 ----
+***************
+*** 9456,9458 ****
+ bøichovitý/YKR
+- bøímì
+ bøímì/M
+--- 9449,9450 ----
+***************
+*** 9667,9669 ****
+ budy¹ínský/Y
+- bufet
+ bufetáøèin/Y
+--- 9659,9660 ----
+***************
+*** 9677,9679 ****
+ bufferový/YRN
+- buffet
+ buffet/H
+--- 9668,9669 ----
+***************
+*** 11386,11388 ****
+ cop/H
+- copyright
+ copyright/H
+--- 11376,11377 ----
+***************
+*** 11446,11448 ****
+ cresc
+- crescendo
+ crescendo/MQ
+--- 11435,11436 ----
+***************
+*** 13810,13812 ****
+ daktylus/Q
+- dál
+ dalajláma/PV
+--- 13798,13799 ----
+***************
+*** 13816,13818 ****
+ dál/E
+- dále
+ Dalecký/Y
+--- 13803,13804 ----
+***************
+*** 13821,13823 ****
+ dále/E
+- daleko
+ dalekohled/H
+--- 13807,13808 ----
+***************
+*** 14082,14084 ****
+ datla
+- datle
+ datlech
+--- 14067,14068 ----
+***************
+*** 14756,14758 ****
+ dekuraèní/YRN
+- dìl
+ delaborace/Z
+--- 14740,14741 ----
+***************
+*** 15301,15303 ****
+ desaterákùv/Y
+- desatero
+ desatero/MQ
+--- 15284,15285 ----
+***************
+*** 15716,15718 ****
+ devaterník/H
+- devatero
+ devatero/MQ
+--- 15698,15699 ----
+***************
+*** 16152,16154 ****
+ DIK
+- dík
+ dikalciumfosfát/H
+--- 16133,16134 ----
+***************
+*** 16603,16605 ****
+ Diùv/Y
+- div
+ divácký/YKR
+--- 16583,16584 ----
+***************
+*** 19886,19888 ****
+ dopola
+- dopoledne
+ dopoledne/M
+--- 19865,19866 ----
+***************
+*** 19970,19972 ****
+ doprat/ATN
+- doprava
+ doprava/ZQ
+--- 19948,19949 ----
+***************
+*** 22912,22914 ****
+ døív/E
+- døíve
+ døíveèko/MQ
+--- 22889,22890 ----
+***************
+*** 26369,26371 ****
+ fakoemulsifikace/Z
+- faksimile
+ faksimile/Z
+--- 26345,26346 ----
+***************
+*** 27266,27268 ****
+ fimóza/ZQ
+- finále
+ finále/Z
+--- 27241,27242 ----
+***************
+*** 28101,28103 ****
+ foxtrotový/Y
+- foyer
+ foyer/H
+--- 28075,28076 ----
+***************
+*** 28759,28761 ****
+ Gajdùv/Y
+- Gal
+ gal
+--- 28732,28733 ----
+***************
+*** 29060,29062 ****
+ gemovat/ATN
+- gen
+ genciánový/YR
+--- 29032,29033 ----
+***************
+*** 29410,29412 ****
+ glejt/H
+- glissando
+ glissando/MQ
+--- 29381,29382 ----
+***************
+*** 31247,31249 ****
+ hefebrand/H
+- Hegel
+ Hegela
+--- 31217,31218 ----
+***************
+*** 31602,31604 ****
+ Herkulem
+- Herkules
+ Herkules/D
+--- 31571,31572 ----
+***************
+*** 32258,32260 ****
+ hloubìtínský/Y
+- hloubi
+ hloubicí/Y
+--- 32226,32227 ----
+***************
+*** 32612,32614 ****
+ Hocký/Y
+- hod
+ Hodìjice/C
+--- 32579,32580 ----
+***************
+*** 33069,33071 ****
+ homoisoflavonoid/H
+- Homola
+ Homola/PV
+--- 33035,33036 ----
+***************
+*** 34389,34391 ****
+ høebelec/S
+- høeben
+ høebenatka/ZQ
+--- 34354,34355 ----
+***************
+*** 34817,34819 ****
+ Huserkùv/Y
+- husí
+ husice/ZQ
+--- 34781,34782 ----
+***************
+*** 36441,36443 ****
+ chøupavý/YKRN
+- chtì
+ chtìje/XN
+--- 36404,36405 ----
+***************
+*** 38569,38571 ****
+ jajaj
+- jak
+ jakákoli
+--- 38531,38532 ----
+***************
+*** 39323,39325 ****
+ jedné/N
+- jedni
+ jednice/ZQ
+--- 39284,39285 ----
+***************
+*** 39534,39536 ****
+ jednotýdenní/YR
+- jednou
+ jednoúèelový/YRN
+--- 39494,39495 ----
+***************
+*** 39717,39719 ****
+ jemu¾
+- jen
+ Jena/ZQ
+--- 39676,39677 ----
+***************
+*** 39755,39757 ****
+ jen/N
+- jenom
+ jenom/N
+--- 39713,39714 ----
+***************
+*** 40149,40151 ****
+ jináè/S
+- jinak
+ jinak/N
+--- 40106,40107 ----
+***************
+*** 41317,41319 ****
+ Kalistùv/Y
+- Kali¹
+ kalí¹ek/Q
+--- 41273,41274 ----
+***************
+*** 42861,42863 ****
+ kde¾to
+- kdo
+ kdojíjak
+--- 42816,42817 ----
+***************
+*** 44048,44050 ****
+ Klsákùv/Y
+- klub
+ klubající/YN
+--- 44002,44003 ----
+***************
+*** 44235,44237 ****
+ Kneøùv/Y
+- knìz
+ knìze
+--- 44188,44189 ----
+***************
+*** 45007,45009 ****
+ kolik
+- kolika
+ kolikaciferný/YKRN
+--- 44959,44960 ----
+***************
+*** 46292,46294 ****
+ kontinuum/MQ
+- konto
+ kontokorent/H
+--- 46243,46244 ----
+***************
+*** 47152,47154 ****
+ kosmopolitùv/Y
+- kosmos
+ kosmos/Q
+--- 47102,47103 ----
+***************
+*** 51844,51846 ****
+ Leclancheùv/Y
+- leè
+ léèba/ZQ
+--- 51793,51794 ----
+***************
+*** 52449,52451 ****
+ le¹tivý/YKRN
+- let
+ létací/YN
+--- 52397,52398 ----
+***************
+*** 54351,54353 ****
+ lùj
+- luk
+ Lukáèová/Y
+--- 54298,54299 ----
+***************
+*** 55408,55410 ****
+ Mallorca/ZQ
+- málo
+ malobur¾oasie/Z
+--- 55354,55355 ----
+***************
+*** 55574,55576 ****
+ mamutùv/Y
+- Man
+ má/N
+--- 55519,55520 ----
+***************
+*** 55852,55854 ****
+ Maputo/MQ
+- marabu
+ marabu/PV
+--- 55796,55797 ----
+***************
+*** 57254,57256 ****
+ Mendlùv/Y
+- ménì
+ ménìcennìj¹í/YRW
+--- 57197,57198 ----
+***************
+*** 58358,58360 ****
+ milený/YN
+- milerád
+ milerád/O
+--- 58300,58301 ----
+***************
+*** 59426,59428 ****
+ mocím
+- mocipán
+ mocipána
+--- 59367,59368 ----
+***************
+*** 60833,60835 ****
+ Muchùv/Y
+- mùj
+ mùj/Y
+--- 60773,60774 ----
+***************
+*** 62308,62310 ****
+ nadplocha/ZQ
+- nadpoèet
+ nadpoèetnìj¹í/YRW
+--- 62247,62248 ----
+***************
+*** 66114,66116 ****
+ nava¾ující/YN
+- naveèer
+ naveèer/L
+--- 66052,66053 ----
+***************
+*** 66581,66583 ****
+ nebes
+- nebesa
+ nebesa/MQ
+--- 66518,66519 ----
+***************
+*** 68080,68082 ****
+ noblesní/YKR
+- noc
+ nocemi
+--- 68016,68017 ----
+***************
+*** 68562,68564 ****
+ novum/MQ
+- Nový
+ Nový/Y
+--- 68497,68498 ----
+***************
+*** 73018,73020 ****
+ odpojovávat/JTN
+- odpoledne
+ odpoledne/M
+--- 72952,72953 ----
+***************
+*** 73121,73123 ****
+ odpra¹ovat/ATN
+- odprava
+ odprava/ZQ
+--- 73054,73055 ----
+***************
+*** 76145,76147 ****
+ oosféra/ZQ
+- op
+ opáèení/SN
+--- 76077,76078 ----
+***************
+*** 78040,78042 ****
+ ostøihnout/ATN
+- Ostøihom
+ Ostøihom/K
+--- 77971,77972 ----
+***************
+*** 80117,80121 ****
+ pantheistický/YCR
+- pantofel
+ pantofel/Q
+- pantofle
+ pantoflemi
+--- 80047,80049 ----
+***************
+*** 80258,80260 ****
+ par
+- pár
+ paraamfibolit/H
+--- 80186,80187 ----
+***************
+*** 81414,81416 ****
+ PE
+- pec
+ pecaø/U
+--- 81341,81342 ----
+***************
+*** 82720,82722 ****
+ pianistùv/Y
+- piano
+ piáno/MQ
+--- 82646,82647 ----
+***************
+*** 83321,83323 ****
+ pizzerie/Z
+- pizzicato
+ pizzicato/MQ
+--- 83246,83247 ----
+***************
+*** 83731,83733 ****
+ plebiscit/H
+- plebs
+ plebse
+--- 83655,83656 ----
+***************
+*** 83833,83835 ****
+ Pleskotùv/Y
+- plesky
+ plesky/H
+--- 83756,83757 ----
+***************
+*** 85861,85863 ****
+ podøadìní/SN
+- podøadìný
+ podøadìný/YKRN
+--- 85783,85784 ----
+***************
+*** 89077,89079 ****
+ popøávat/JN
+- popøedí
+ popøedí/S
+--- 88998,88999 ----
+***************
+*** 91358,91360 ****
+ pozabíjet/JTN
+- pozadí
+ pozadí/S
+--- 91278,91279 ----
+***************
+*** 91783,91785 ****
+ práceschopný/YKR
+- prací
+ práci
+--- 91702,91703 ----
+***************
+*** 92176,92178 ****
+ pravìký/YKR
+- právem
+ právem/N
+--- 92094,92095 ----
+***************
+*** 95377,95379 ****
+ prospávat/JTN
+- prospìch
+ prospìchání/SN
+--- 95294,95295 ----
+***************
+*** 105195,105197 ****
+ pùldenní/YR
+- pùldne
+ pùldnech
+--- 105111,105112 ----
+***************
+*** 105216,105218 ****
+ pùldruhý/Y
+- pùle
+ pulec/U
+--- 105131,105132 ----
+***************
+*** 106257,106259 ****
+ rámcový/YR
+- rámì
+ rámec/S
+--- 106171,106172 ----
+***************
+*** 109304,109306 ****
+ rozdìlující/YN
+- rozdíl
+ rozdílení/SN
+--- 109217,109218 ----
+***************
+*** 113029,113031 ****
+ Rúr/H
+- Rus
+ rusalèí/Y
+--- 112941,112942 ----
+***************
+*** 113124,113126 ****
+ ru¹tina/ZQ
+- Rút
+ Rùta/PV
+--- 113035,113036 ----
+***************
+*** 115104,115106 ****
+ scezovat/ATN
+- science
+ science/Z
+--- 115014,115015 ----
+***************
+*** 115723,115725 ****
+ sedmerèe/K
+- sedmero
+ sedmero/MQ
+--- 115632,115633 ----
+***************
+*** 116249,116251 ****
+ Sémùv/Y
+- sen
+ senaø/PI
+--- 116157,116158 ----
+***************
+*** 116962,116964 ****
+ se¹vindlovat/ATN
+- set
+ setba/ZQ
+--- 116869,116870 ----
+***************
+*** 117786,117788 ****
+ Sikùv/Y
+- sil
+ silácký/YKRN
+--- 117692,117693 ----
+***************
+*** 121635,121637 ****
+ spatný/YKR
+- spatra
+ spatra/ZQ
+--- 121540,121541 ----
+***************
+*** 121887,121889 ****
+ spí¹
+- spí¹e
+ spí¹e/E
+--- 121791,121792 ----
+***************
+*** 122323,122325 ****
+ spolupráce/N
+- spolupráci
+ spolupracích/N
+--- 122226,122227 ----
+***************
+*** 122890,122892 ****
+ srovnanìj¹í/YRW
+- srovnání
+ srovnání/SN
+--- 122792,122793 ----
+***************
+*** 129987,129989 ****
+ ¹unt/H
+- ¹up
+ ¹upácký/YKR
+--- 129888,129889 ----
+***************
+*** 130427,130429 ****
+ takovouto
+- takový
+ takovýchto
+--- 130327,130328 ----
+***************
+*** 131190,131192 ****
+ tem¾ský/Y
+- ten
+ tenata/MQ
+--- 131089,131090 ----
+***************
+*** 131958,131960 ****
+ tichý/YKRO
+- tik
+ tikající/YN
+--- 131856,131857 ----
+***************
+*** 132541,132543 ****
+ Tomaschùv/Y
+- Tomá¹
+ Tomá¹ek/PV
+--- 132438,132439 ----
+***************
+*** 133890,133892 ****
+ Trubská/Y
+- truc
+ truc/H
+--- 133786,133787 ----
+***************
+*** 134057,134059 ****
+ tøást/IN
+- tøeba
+ tøeba/N
+--- 133952,133953 ----
+***************
+*** 135024,135026 ****
+ tvrz/Z
+- tvùj
+ tvùj/Y
+--- 134918,134919 ----
+***************
+*** 135532,135534 ****
+ úèesový/YR
+- úèet
+ úèetnický/YRN
+--- 135425,135426 ----
+***************
+*** 139620,139622 ****
+ uzamknutí/SN
+- uzamknutý
+ uzamknutý/YKRN
+--- 139512,139513 ----
+***************
+*** 141624,141626 ****
+ Verdolùv/Y
+- vìren
+ vìren/N
+--- 141515,141516 ----
+***************
+*** 141651,141653 ****
+ vìr/N
+- vìrna
+ vìrna/N
+--- 141541,141542 ----
+***************
+*** 141663,141665 ****
+ Verne/Y
+- vìrni
+ vìrni/N
+--- 141552,141553 ----
+***************
+*** 141667,141669 ****
+ vernisá¾/Z
+- vìrno
+ vìrno/N
+--- 141555,141556 ----
+***************
+*** 141671,141676 ****
+ vernovka/ZQ
+- vìrnu
+ vìrnu/N
+ Vernùv/Y
+- vìrny
+ vìrny/N
+--- 141558,141561 ----
+***************
+*** 141924,141926 ****
+ vetknutí/SN
+- vetknutý
+ vetknutý/YKRN
+--- 141809,141810 ----
+***************
+*** 142117,142119 ****
+ vhloubený/YKRN
+- vhloubit
+ vhloubit/ATN
+--- 142001,142002 ----
+***************
+*** 144104,144106 ****
+ Voldánùv/Y
+- vole
+ volební/YR
+--- 143987,143988 ----
+***************
+*** 144409,144411 ****
+ Votýpkùv/Y
+- vous
+ vousáè/U
+--- 144291,144292 ----
+***************
+*** 144952,144954 ****
+ vrtulový/YR
+- vrub
+ vrub/H
+--- 144833,144834 ----
+***************
+*** 144979,144981 ****
+ vrývavý/YR
+- vrz
+ Vrzáèek/PV
+--- 144859,144860 ----
+***************
+*** 151330,151332 ****
+ vytknutí/SN
+- vytknutý
+ vytknutý/YRN
+--- 151209,151210 ----
+***************
+*** 151927,151929 ****
+ vyvrhnutí/SN
+- vyvrhnutý
+ vyvrhnutý/YKRN
+--- 151805,151806 ----
+***************
+*** 152435,152437 ****
+ vzdìlávat/JTN
+- vzdor
+ vzdor/H
+--- 152312,152313 ----
+***************
+*** 156040,156042 ****
+ zamknutí/SN
+- zamknutý
+ zamknutý/YKRN
+--- 155916,155917 ----
+***************
+*** 157795,157797 ****
+ zastonejte/N
+- zastoupení
+ zastoupení/SN
+--- 157670,157671 ----
+***************
+*** 160364,160366 ****
+ zebøí/Y
+- zebu
+ zebu/BN
+--- 160238,160239 ----
+***************
+*** 166409,166411 ****
+ ®muï
+- ¾nec
+ ¾nec/U
+--- 166282,166283 ----
diff --git a/runtime/spell/cs/main.aap b/runtime/spell/cs/main.aap
new file mode 100644
index 000000000..5ead6d0a3
--- /dev/null
+++ b/runtime/spell/cs/main.aap
@@ -0,0 +1,81 @@
+# Aap recipe for Czech Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+SPELLDIR = ..
+FILES = cs_CZ.aff cs_CZ.dic
+
+all: $SPELLDIR/cs.iso-8859-2.spl $SPELLDIR/cs.utf-8.spl \
+ $SPELLDIR/cs.cp1250.spl ../README_cs.txt
+
+$SPELLDIR/cs.iso-8859-2.spl : $VIM $FILES
+ :sys env LANG=cs_CZ.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/cs cs_CZ" -c q
+
+$SPELLDIR/cs.utf-8.spl : $VIM $FILES
+ :sys env LANG=cs_CZ.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/cs cs_CZ" -c q
+
+$SPELLDIR/cs.cp1250.spl : $VIM $FILES
+ :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/cs cs_CZ" -c q
+
+../README_cs.txt: README_cs_CZ.txt
+ :copy $source $target
+
+#
+# Fetching the files from OpenOffice.org.
+#
+OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
+:attr {fetch = $OODIR/%file%} cs_CZ.zip
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+# This is a bit tricky, since the file name includes the date.
+cs_CZ.aff cs_CZ.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch cs_CZ.zip
+ :sys $UNZIP cs_CZ.zip
+ :delete cs_CZ.zip
+ @if not os.path.exists('cs_CZ.orig.aff'):
+ :copy cs_CZ.aff cs_CZ.orig.aff
+ @if not os.path.exists('cs_CZ.orig.dic'):
+ :copy cs_CZ.dic cs_CZ.orig.dic
+ @if os.path.exists('cs_CZ.diff'):
+ :sys patch <cs_CZ.diff
+
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+ :assertpkg diff
+ :sys {force} diff -a -C 1 cs_CZ.orig.aff cs_CZ.aff >cs_CZ.diff
+ :sys {force} diff -a -C 1 cs_CZ.orig.dic cs_CZ.dic >>cs_CZ.diff
+
+
+# Check for updated OpenOffice spell files. When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+ :assertpkg unzip diff
+ :fetch cs_CZ.zip
+ :mkdir tmp
+ :cd tmp
+ @try:
+ @import stat
+ :sys $UNZIP ../cs_CZ.zip
+ :sys {force} diff ../cs_CZ.orig.aff cs_CZ.aff >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy cs_CZ.aff ../cs_CZ.new.aff
+ :sys {force} diff ../cs_CZ.orig.dic cs_CZ.dic >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy cs_CZ.dic ../cs_CZ.new.dic
+ @finally:
+ :cd ..
+ :delete {r}{f}{q} tmp
+ :delete cs_CZ.zip
+
+
+# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/da/main.aap b/runtime/spell/da/main.aap
new file mode 100644
index 000000000..53e371648
--- /dev/null
+++ b/runtime/spell/da/main.aap
@@ -0,0 +1,78 @@
+# Aap recipe for French Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+SPELLDIR = ..
+FILES = da_DK.aff da_DK.dic
+
+all: $SPELLDIR/da.latin1.spl $SPELLDIR/da.utf-8.spl ../README_da.txt
+
+$SPELLDIR/da.latin1.spl : $VIM $FILES
+ :sys env LANG=da_DK.ISO8859-1
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/da da_DK" -c q
+
+$SPELLDIR/da.utf-8.spl : $VIM $FILES
+ :sys env LANG=da_DK.UTF-8
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/da da_DK" -c q
+
+../README_da.txt : README Copyright
+ :cat $source >! $target
+
+#
+# Fetching the files from OpenOffice.org.
+#
+OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
+:attr {fetch = $OODIR/%file%} da_DK.zip
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+da_DK.aff da_DK.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch da_DK.zip
+ :sys $UNZIP da_DK.zip
+ :delete da_DK.zip
+ @if not os.path.exists('da_DK.orig.aff'):
+ :copy da_DK.aff da_DK.orig.aff
+ @if not os.path.exists('da_DK.orig.dic'):
+ :copy da_DK.dic da_DK.orig.dic
+ @if os.path.exists('da_DK.diff'):
+ :sys patch <da_DK.diff
+
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+ :assertpkg diff
+ :sys {force} diff -a -C 1 da_DK.orig.aff da_DK.aff >da_DK.diff
+ :sys {force} diff -a -C 1 da_DK.orig.dic da_DK.dic >>da_DK.diff
+
+
+# Check for updated OpenOffice spell files. When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+ :assertpkg unzip diff
+ :fetch da_DK.zip
+ :mkdir tmp
+ :cd tmp
+ @try:
+ @import stat
+ :sys $UNZIP ../da_DK.zip
+ :sys {force} diff ../da_DK.orig.aff da_DK.aff >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy da_DK.aff ../da_DK.new.aff
+ :sys {force} diff ../da_DK.orig.dic da_DK.dic >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy da_DK.dic ../da_DK.new.dic
+ @finally:
+ :cd ..
+ :delete {r}{f}{q} tmp
+ :delete da_DK.zip
+
+
+# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/de/de_19.diff b/runtime/spell/de/de_19.diff
new file mode 100644
index 000000000..a807a8b16
--- /dev/null
+++ b/runtime/spell/de/de_19.diff
@@ -0,0 +1,27 @@
+*** de_19.orig.aff Mon Aug 15 22:45:35 2005
+--- de_19.aff Mon Aug 15 22:54:10 2005
+***************
+*** 3,4 ****
+--- 3,24 ----
+
++ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
++
++ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
++ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
++
++ MIDWORD '
++
++ MAP 9
++ MAP aàáâãäå
++ MAP eèéêë
++ MAP iìíîï
++ MAP oòóôõö
++ MAP uùúûü
++ MAP nñ
++ MAP cç
++ MAP yÿý
++ MAP sß
++
+
diff --git a/runtime/spell/de/de_20.diff b/runtime/spell/de/de_20.diff
new file mode 100644
index 000000000..432ad5fd9
--- /dev/null
+++ b/runtime/spell/de/de_20.diff
@@ -0,0 +1,28 @@
+*** de_20.orig.aff Mon Aug 15 22:45:41 2005
+--- de_20.aff Mon Aug 15 22:54:16 2005
+***************
+*** 2,3 ****
+--- 2,24 ----
+ TRY esianrtolcdugmphbyfvkwäüößáéêàâñESIANRTOLCDUGMPHBYFVKWÄÜÖ
++
++ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
++
++ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
++ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
++
++ MIDWORD '
++
++ MAP 9
++ MAP aàáâãäå
++ MAP eèéêë
++ MAP iìíîï
++ MAP oòóôõö
++ MAP uùúûü
++ MAP nñ
++ MAP cç
++ MAP yÿý
++ MAP sß
++
+ #
diff --git a/runtime/spell/de/de_AT.diff b/runtime/spell/de/de_AT.diff
new file mode 100644
index 000000000..e13e4d5d3
--- /dev/null
+++ b/runtime/spell/de/de_AT.diff
@@ -0,0 +1,44 @@
+*** de_AT.orig.aff Mon Aug 15 22:59:43 2005
+--- de_AT.aff Mon Aug 15 23:00:25 2005
+***************
+*** 3,4 ****
+--- 3,24 ----
+
++ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
++
++ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
++ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
++
++ MIDWORD '
++
++ MAP 9
++ MAP aàáâãäå
++ MAP eèéêë
++ MAP iìíîï
++ MAP oòóôõö
++ MAP uùúûü
++ MAP nñ
++ MAP cç
++ MAP yÿý
++ MAP sß
++
+
+*** de_AT.orig.dic Mon Aug 15 22:59:43 2005
+--- de_AT.dic Mon Aug 15 23:03:19 2005
+***************
+*** 18,20 ****
+ Fleischbänke/N
+- Fleischbank
+ Fleischhauer/NS
+--- 18,19 ----
+***************
+*** 151,153 ****
+ zulieb
+! 77857
+ Äbte/N
+--- 150,152 ----
+ zulieb
+!
+ Äbte/N
diff --git a/runtime/spell/de/de_CH.diff b/runtime/spell/de/de_CH.diff
new file mode 100644
index 000000000..607f87408
--- /dev/null
+++ b/runtime/spell/de/de_CH.diff
@@ -0,0 +1,27 @@
+*** de_CH.orig.aff Mon Aug 15 22:45:43 2005
+--- de_CH.aff Mon Aug 15 22:54:21 2005
+***************
+*** 3,4 ****
+--- 3,24 ----
+
++ FOL àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ LOW àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ UPP ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
++
++ SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ¿
++ SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
++
++ MIDWORD '
++
++ MAP 9
++ MAP aàáâãäå
++ MAP eèéêë
++ MAP iìíîï
++ MAP oòóôõö
++ MAP uùúûü
++ MAP nñ
++ MAP cç
++ MAP yÿý
++ MAP sß
++
+
diff --git a/runtime/spell/de/de_DE.diff b/runtime/spell/de/de_DE.diff
index 0d395e85a..fe33b41b8 100644
--- a/runtime/spell/de/de_DE.diff
+++ b/runtime/spell/de/de_DE.diff
@@ -1,5 +1,5 @@
-*** de_DE.orig.aff Fri Feb 25 12:50:10 2005
---- de_DE.aff Sun Jul 31 22:15:49 2005
+*** de_DE.orig.aff Mon Aug 15 22:45:33 2005
+--- de_DE.aff Mon Aug 15 22:45:33 2005
***************
*** 2,3 ****
--- 2,24 ----
diff --git a/runtime/spell/de/main.aap b/runtime/spell/de/main.aap
index 80bfcea9b..df608e1b7 100644
--- a/runtime/spell/de/main.aap
+++ b/runtime/spell/de/main.aap
@@ -1,4 +1,13 @@
# Aap recipe for German Vim spell files.
+#
+# Since there is a big discussion about whether to use the old or the new
+# spelling rules, both have been included.
+# "de": all possible words allowed
+# "de_de": old and new German spelling
+# "de_19": old German spelling
+# "de_20": new German spelling
+# "de_AT": Austrian spelling
+# "de_CH": Swiss spelling
# Use a freshly compiled Vim if it exists.
@if os.path.exists('../../../src/vim'):
@@ -6,66 +15,170 @@
@else:
:progsearch VIM vim
-SPELLDIR = ..
-FILES = de_DE.aff de_DE.dic
-ZIPFILE = de_DE_comb.zip
+REGIONS = DE 19 20 AT CH
+DE_REGIONS = de_$*REGIONS
+
+SPELLDIR = ..
+FILES = de_$*(REGIONS).aff de_$*(REGIONS).dic
+
+ZIPFILE_DE = de_DE_comb.zip
+ZIPFILE_19 = de_DE.zip
+ZIPFILE_20 = de_DE_neu.zip
+ZIPFILE_AT = de_AT.zip
+ZIPFILE_CH = de_CH.zip
+ZIPFILES = $ZIPFILE_DE $ZIPFILE_19 $ZIPFILE_20 $ZIPFILE_AT $ZIPFILE_CH
+
+READMES = README_de_$*(REGIONS).txt
-all: $(SPELLDIR)/de.latin1.spl $(SPELLDIR)/de.utf-8.spl ../README_de.txt
+all: $SPELLDIR/de.latin1.spl $SPELLDIR/de.utf-8.spl ../README_de.txt
-$(SPELLDIR)/de.latin1.spl : $(VIM) $(FILES)
+$SPELLDIR/de.latin1.spl : $VIM $FILES
:sys env LANG=de_DE.ISO8859-1
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/de de_DE" -c q
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
-$(SPELLDIR)/de.utf-8.spl : $(VIM) $(FILES)
+$SPELLDIR/de.utf-8.spl : $VIM $FILES
:sys env LANG=de_DE.UTF-8
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/de de_DE" -c q
-
-../README_de.txt: README_de_DE_comb.txt
- :copy $source $target
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/de $DE_REGIONS" -c q
+
+../README_de.txt: $READMES
+ :print de_DE (combined) >! $target
+ :cat README_de_DE.txt >> $target
+ :print =================================================== >>$target
+ :print de_19 (old) >> $target
+ :cat README_de_19.txt >> $target
+ :print =================================================== >>$target
+ :print de_20 (new) >> $target
+ :cat README_de_20.txt >> $target
+ :print =================================================== >>$target
+ :print de_AT (Austria) >> $target
+ :cat README_de_AT.txt >> $target
+ :print =================================================== >>$target
+ :print de_CH (Swiss) >> $target
+ :cat README_de_CH.txt >> $target
#
# Fetching the files from OpenOffice.org.
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
-:attr {fetch = $(OODIR)/%file%} $(ZIPFILE)
+:attr {fetch = $OODIR/%file%} $ZIPFILES
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
de_DE.aff de_DE.dic: {buildcheck=}
:assertpkg unzip patch
- :fetch $(ZIPFILE)
- :sys $(UNZIP) $(ZIPFILE)
- :delete $(ZIPFILE)
+ :fetch $ZIPFILE_DE
+ :sys $UNZIP $ZIPFILE_DE
+ :delete $ZIPFILE_DE
:move de_DE_comb.aff de_DE.aff
:move de_DE_comb.dic de_DE.dic
+ :move README_de_DE_comb.txt README_de_DE.txt
@if not os.path.exists('de_DE.orig.aff'):
- :copy de_DE.aff de_DE.orig.aff
+ :copy de_DE.aff de_DE.orig.aff
@if not os.path.exists('de_DE.orig.dic'):
- :copy de_DE.dic de_DE.orig.dic
+ :copy de_DE.dic de_DE.orig.dic
@if os.path.exists('de_DE.diff'):
:sys patch <de_DE.diff
+de_19.aff de_19.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch $ZIPFILE_19
+ # Move the other files out of the way.
+ @if os.path.exists("de_DE.aff"):
+ :move de_DE.aff de_DE_comb.aff
+ :move de_DE.dic de_DE_comb.dic
+ :move README_de_DE.txt README_de_DE_comb.txt
+
+ :sys $UNZIP $ZIPFILE_19
+ :delete $ZIPFILE_19
+ :delete {f} de_AT.dic
+ :move de_DE.aff de_19.aff
+ :move de_DE.dic de_19.dic
+ :move README_de_DE.txt README_de_19.txt
+
+ @if os.path.exists("de_DE_comb.aff"):
+ :move de_DE_comb.aff de_DE.aff
+ :move de_DE_comb.dic de_DE.dic
+ :move README_de_DE_comb.txt README_de_DE.txt
+ @if not os.path.exists('de_19.orig.aff'):
+ :copy de_19.aff de_19.orig.aff
+ @if not os.path.exists('de_19.orig.dic'):
+ :copy de_19.dic de_19.orig.dic
+ @if os.path.exists('de_19.diff'):
+ :sys patch <de_19.diff
+
+de_20.aff de_20.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch $ZIPFILE_20
+ :sys $UNZIP $ZIPFILE_20
+ :delete $ZIPFILE_20
+ :move de_DE_neu.aff de_20.aff
+ :move de_DE_neu.dic de_20.dic
+ :move README_de_DE_neu.txt README_de_20.txt
+ @if not os.path.exists('de_20.orig.aff'):
+ :copy de_20.aff de_20.orig.aff
+ @if not os.path.exists('de_20.orig.dic'):
+ :copy de_20.dic de_20.orig.dic
+ @if os.path.exists('de_20.diff'):
+ :sys patch <de_20.diff
+
+# It appears de_AT.dic is only an additional file for another word list. We
+# guess it's the old spelling one and concatenate them. Complication is that
+# de_AT.dic is missing a newline at the end.
+de_AT.aff de_AT.dic: {buildcheck=} de_19.dic
+ :assertpkg unzip patch
+ :fetch $ZIPFILE_AT
+ :sys $UNZIP $ZIPFILE_AT
+ :delete $ZIPFILE_AT
+ :print >>de_AT.dic
+ :cat de_19.dic >>de_AT.dic
+ @if not os.path.exists('de_AT.orig.aff'):
+ :copy de_AT.aff de_AT.orig.aff
+ @if not os.path.exists('de_AT.orig.dic'):
+ :copy de_AT.dic de_AT.orig.dic
+ @if os.path.exists('de_AT.diff'):
+ :sys patch <de_AT.diff
+
+de_CH.aff de_CH.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch $ZIPFILE_CH
+ :sys $UNZIP $ZIPFILE_CH
+ :delete $ZIPFILE_CH
+ @if not os.path.exists('de_CH.orig.aff'):
+ :copy de_CH.aff de_CH.orig.aff
+ @if not os.path.exists('de_CH.orig.dic'):
+ :copy de_CH.dic de_CH.orig.dic
+ @if os.path.exists('de_CH.diff'):
+ :sys patch <de_CH.diff
+
# Generate diff files, so that others can get the OpenOffice files and apply
# the diffs to get the Vim versions.
-
diff:
:assertpkg diff
:sys {force} diff -a -C 1 de_DE.orig.aff de_DE.aff >de_DE.diff
:sys {force} diff -a -C 1 de_DE.orig.dic de_DE.dic >>de_DE.diff
+ :sys {force} diff -a -C 1 de_19.orig.aff de_19.aff >de_19.diff
+ :sys {force} diff -a -C 1 de_19.orig.dic de_19.dic >>de_19.diff
+ :sys {force} diff -a -C 1 de_20.orig.aff de_20.aff >de_20.diff
+ :sys {force} diff -a -C 1 de_20.orig.dic de_20.dic >>de_20.diff
+ :sys {force} diff -a -C 1 de_AT.orig.aff de_AT.aff >de_AT.diff
+ :sys {force} diff -a -C 1 de_AT.orig.dic de_AT.dic >>de_AT.diff
+ :sys {force} diff -a -C 1 de_CH.orig.aff de_CH.aff >de_CH.diff
+ :sys {force} diff -a -C 1 de_CH.orig.dic de_CH.dic >>de_CH.diff
# Check for updated OpenOffice spell files. When there are changes the
# ".new.aff" and ".new.dic" files are left behind for manual inspection.
check:
+ :print TODO!!!!
:assertpkg unzip diff
- :fetch $(ZIPFILE)
+ :fetch $ZIPFILE_DE
:mkdir tmp
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../$(ZIPFILE)
+ :sys $UNZIP ../$ZIPFILE_DE
:move de_DE_comb.aff de_DE.aff
:move de_DE_comb.dic de_DE.dic
:sys {force} diff ../de_DE.orig.aff de_DE.aff >d
@@ -77,7 +190,7 @@ check:
@finally:
:cd ..
:delete {r}{f}{q} tmp
- :delete $(ZIPFILE)
+ :delete $ZIPFILE_DE
# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/en.ascii.spl b/runtime/spell/en.ascii.spl
index 73c59c7b4..c77ef9af7 100644
--- a/runtime/spell/en.ascii.spl
+++ b/runtime/spell/en.ascii.spl
Binary files differ
diff --git a/runtime/spell/en.latin1.spl b/runtime/spell/en.latin1.spl
index ed645b803..851f7141f 100644
--- a/runtime/spell/en.latin1.spl
+++ b/runtime/spell/en.latin1.spl
Binary files differ
diff --git a/runtime/spell/en.utf-8.spl b/runtime/spell/en.utf-8.spl
index bb2bdb592..d6b783644 100644
--- a/runtime/spell/en.utf-8.spl
+++ b/runtime/spell/en.utf-8.spl
Binary files differ
diff --git a/runtime/spell/en/main.aap b/runtime/spell/en/main.aap
index d46683081..37a9ed10e 100644
--- a/runtime/spell/en/main.aap
+++ b/runtime/spell/en/main.aap
@@ -13,21 +13,21 @@ FILES = en_US.aff en_US.dic
en_GB.aff en_GB.dic
en_NZ.aff en_NZ.dic
-all: $(SPELLDIR)/en.latin1.spl $(SPELLDIR)/en.utf-8.spl \
- $(SPELLDIR)/en.ascii.spl ../README_en.txt
+all: $SPELLDIR/en.latin1.spl $SPELLDIR/en.utf-8.spl \
+ $SPELLDIR/en.ascii.spl ../README_en.txt
-$(SPELLDIR)/en.latin1.spl : $(VIM) $(FILES)
+$SPELLDIR/en.latin1.spl : $VIM $FILES
:sys env LANG=en_US.ISO8859-1
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/en
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/en
en_US en_AU en_CA en_GB en_NZ" -c q
-$(SPELLDIR)/en.utf-8.spl : $(VIM) $(FILES)
+$SPELLDIR/en.utf-8.spl : $VIM $FILES
:sys env LANG=en_US.UTF-8
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/en
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/en
en_US en_AU en_CA en_GB en_NZ" -c q
-$(SPELLDIR)/en.ascii.spl : $(VIM) $(FILES)
- :sys $(VIM) -u NONE -e -c "mkspell! -ascii $(SPELLDIR)/en
+$SPELLDIR/en.ascii.spl : $VIM $FILES
+ :sys $VIM -u NONE -e -c "mkspell! -ascii $SPELLDIR/en
en_US en_AU en_CA en_GB en_NZ" -c q
../README_en.txt: README_en_US.txt README_en_AU.txt
@@ -50,7 +50,7 @@ $(SPELLDIR)/en.ascii.spl : $(VIM) $(FILES)
# Fetching the files from OpenOffice.org.
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
-:attr {fetch = $(OODIR)/%file%} en_US.zip en_CA.zip en_NZ.zip
+:attr {fetch = $OODIR/%file%} en_US.zip en_CA.zip en_NZ.zip
en_GB.zip en_AU.zip
# The files don't depend on the .zip file so that we can delete it.
@@ -58,61 +58,61 @@ OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionari
en_US.aff en_US.dic: {buildcheck=}
:assertpkg unzip patch
:fetch en_US.zip
- :sys $(UNZIP) en_US.zip
+ :sys $UNZIP en_US.zip
:delete en_US.zip
@if not os.path.exists('en_US.orig.aff'):
- :copy en_US.aff en_US.orig.aff
+ :copy en_US.aff en_US.orig.aff
@if not os.path.exists('en_US.orig.dic'):
- :copy en_US.dic en_US.orig.dic
+ :copy en_US.dic en_US.orig.dic
@if os.path.exists('en_US.diff'):
:sys patch <en_US.diff
en_AU.aff en_AU.dic: {buildcheck=}
:assertpkg unzip patch
:fetch en_AU.zip
- :sys $(UNZIP) en_AU.zip
+ :sys $UNZIP en_AU.zip
:delete en_AU.zip
@if not os.path.exists('en_AU.orig.aff'):
- :copy en_AU.aff en_AU.orig.aff
+ :copy en_AU.aff en_AU.orig.aff
@if not os.path.exists('en_AU.orig.dic'):
- :copy en_AU.dic en_AU.orig.dic
+ :copy en_AU.dic en_AU.orig.dic
@if os.path.exists('en_AU.diff'):
:sys patch <en_AU.diff
en_CA.aff en_CA.dic: {buildcheck=}
:assertpkg unzip patch
:fetch en_CA.zip
- :sys $(UNZIP) en_CA.zip
+ :sys $UNZIP en_CA.zip
:delete en_CA.zip
@if not os.path.exists('en_CA.orig.aff'):
- :copy en_CA.aff en_CA.orig.aff
+ :copy en_CA.aff en_CA.orig.aff
@if not os.path.exists('en_CA.orig.dic'):
- :copy en_CA.dic en_CA.orig.dic
+ :copy en_CA.dic en_CA.orig.dic
@if os.path.exists('en_CA.diff'):
:sys patch <en_CA.diff
en_GB.aff en_GB.dic: {buildcheck=}
:assertpkg unzip patch
:fetch en_GB.zip
- :sys $(UNZIP) en_GB.zip
+ :sys $UNZIP en_GB.zip
:delete en_GB.zip
:delete dictionary.lst.example
@if not os.path.exists('en_GB.orig.aff'):
- :copy en_GB.aff en_GB.orig.aff
+ :copy en_GB.aff en_GB.orig.aff
@if not os.path.exists('en_GB.orig.dic'):
- :copy en_GB.dic en_GB.orig.dic
+ :copy en_GB.dic en_GB.orig.dic
@if os.path.exists('en_GB.diff'):
:sys patch <en_GB.diff
en_NZ.aff en_NZ.dic: {buildcheck=}
:assertpkg unzip patch
:fetch en_NZ.zip
- :sys $(UNZIP) en_NZ.zip
+ :sys $UNZIP en_NZ.zip
:delete en_NZ.zip
@if not os.path.exists('en_NZ.orig.aff'):
- :copy en_NZ.aff en_NZ.orig.aff
+ :copy en_NZ.aff en_NZ.orig.aff
@if not os.path.exists('en_NZ.orig.dic'):
- :copy en_NZ.dic en_NZ.orig.dic
+ :copy en_NZ.dic en_NZ.orig.dic
@if os.path.exists('en_NZ.diff'):
:sys patch <en_NZ.diff
@@ -146,7 +146,7 @@ check-us:
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../en_US.zip
+ :sys $UNZIP ../en_US.zip
:sys {force} diff ../en_US.orig.aff en_US.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy en_US.aff ../en_US.new.aff
@@ -165,7 +165,7 @@ check-au:
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../en_AU.zip
+ :sys $UNZIP ../en_AU.zip
:sys {force} diff ../en_AU.orig.aff en_AU.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy en_AU.aff ../en_AU.new.aff
@@ -184,7 +184,7 @@ check-ca:
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../en_CA.zip
+ :sys $UNZIP ../en_CA.zip
:sys {force} diff ../en_CA.orig.aff en_CA.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy en_CA.aff ../en_CA.new.aff
@@ -203,7 +203,7 @@ check-gb:
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../en_GB.zip
+ :sys $UNZIP ../en_GB.zip
:sys {force} diff ../en_GB.orig.aff en_GB.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy en_GB.aff ../en_GB.new.aff
@@ -222,7 +222,7 @@ check-nz:
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../en_NZ.zip
+ :sys $UNZIP ../en_NZ.zip
:sys {force} diff ../en_NZ.orig.aff en_NZ.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy en_NZ.aff ../en_NZ.new.aff
diff --git a/runtime/spell/fr/main.aap b/runtime/spell/fr/main.aap
index 4580c9c69..9e51039a4 100644
--- a/runtime/spell/fr/main.aap
+++ b/runtime/spell/fr/main.aap
@@ -9,15 +9,15 @@
SPELLDIR = ..
FILES = fr_FR.aff fr_FR.dic
-all: $(SPELLDIR)/fr.latin1.spl $(SPELLDIR)/fr.utf-8.spl ../README_fr.txt
+all: $SPELLDIR/fr.latin1.spl $SPELLDIR/fr.utf-8.spl ../README_fr.txt
-$(SPELLDIR)/fr.latin1.spl : $(VIM) $(FILES)
+$SPELLDIR/fr.latin1.spl : $VIM $FILES
:sys env LANG=fr_FR.ISO8859-1
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/fr fr_FR" -c q
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/fr fr_FR" -c q
-$(SPELLDIR)/fr.utf-8.spl : $(VIM) $(FILES)
+$SPELLDIR/fr.utf-8.spl : $VIM $FILES
:sys env LANG=fr_FR.UTF-8
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/fr fr_FR" -c q
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/fr fr_FR" -c q
../README_fr.txt : README_fr_FR.txt
:copy $source $target
@@ -26,19 +26,19 @@ $(SPELLDIR)/fr.utf-8.spl : $(VIM) $(FILES)
# Fetching the files from OpenOffice.org.
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
-:attr {fetch = $(OODIR)/%file%} fr_FR.zip
+:attr {fetch = $OODIR/%file%} fr_FR.zip
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
fr_FR.aff fr_FR.dic: {buildcheck=}
:assertpkg unzip patch
:fetch fr_FR.zip
- :sys $(UNZIP) fr_FR.zip
+ :sys $UNZIP fr_FR.zip
:delete fr_FR.zip
@if not os.path.exists('fr_FR.orig.aff'):
- :copy fr_FR.aff fr_FR.orig.aff
+ :copy fr_FR.aff fr_FR.orig.aff
@if not os.path.exists('fr_FR.orig.dic'):
- :copy fr_FR.dic fr_FR.orig.dic
+ :copy fr_FR.dic fr_FR.orig.dic
@if os.path.exists('fr_FR.diff'):
:sys patch <fr_FR.diff
@@ -62,7 +62,7 @@ check:
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../fr_FR.zip
+ :sys $UNZIP ../fr_FR.zip
:sys {force} diff ../fr_FR.orig.aff fr_FR.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy fr_FR.aff ../fr_FR.new.aff
diff --git a/runtime/spell/he/main.aap b/runtime/spell/he/main.aap
index a002bc7bd..4db930b9f 100644
--- a/runtime/spell/he/main.aap
+++ b/runtime/spell/he/main.aap
@@ -9,15 +9,15 @@
SPELLDIR = ..
FILES = he_IL.aff he_IL.dic
-all: $(SPELLDIR)/he.utf-8.spl $(SPELLDIR)/he.iso-8859-8.spl ../README_he.txt
+all: $SPELLDIR/he.utf-8.spl $SPELLDIR/he.iso-8859-8.spl ../README_he.txt
-$(SPELLDIR)/he.utf-8.spl : $(VIM) $(FILES)
+$SPELLDIR/he.utf-8.spl : $VIM $FILES
:sys env LANG=he_IL.UTF-8
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/he he_IL" -c q
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/he he_IL" -c q
-$(SPELLDIR)/he.iso-8859-8.spl : $(VIM) $(FILES)
- :sys $(VIM) -u NONE -e -c "set enc=iso-8859-8"
- -c "mkspell! $(SPELLDIR)/he he_IL" -c q
+$SPELLDIR/he.iso-8859-8.spl : $VIM $FILES
+ :sys $VIM -u NONE -e -c "set enc=iso-8859-8"
+ -c "mkspell! $SPELLDIR/he he_IL" -c q
../README_he.txt : README_he_IL.txt
:copy $source $target
@@ -26,19 +26,19 @@ $(SPELLDIR)/he.iso-8859-8.spl : $(VIM) $(FILES)
# Fetching the files from OpenOffice.org.
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
-:attr {fetch = $(OODIR)/%file%} he_IL.zip
+:attr {fetch = $OODIR/%file%} he_IL.zip
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
he_IL.aff he_IL.dic: {buildcheck=}
:assertpkg unzip patch
:fetch he_IL.zip
- :sys $(UNZIP) he_IL.zip
+ :sys $UNZIP he_IL.zip
:delete he_IL.zip
@if not os.path.exists('he_IL.orig.aff'):
- :copy he_IL.aff he_IL.orig.aff
+ :copy he_IL.aff he_IL.orig.aff
@if not os.path.exists('he_IL.orig.dic'):
- :copy he_IL.dic he_IL.orig.dic
+ :copy he_IL.dic he_IL.orig.dic
@if os.path.exists('he_IL.diff'):
:sys patch <he_IL.diff
@@ -62,7 +62,7 @@ check:
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../he_IL.zip
+ :sys $UNZIP ../he_IL.zip
:sys {force} diff ../he_IL.orig.aff he_IL.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy he_IL.aff ../he_IL.new.aff
diff --git a/runtime/spell/hr/main.aap b/runtime/spell/hr/main.aap
new file mode 100644
index 000000000..f272b873e
--- /dev/null
+++ b/runtime/spell/hr/main.aap
@@ -0,0 +1,81 @@
+# Aap recipe for Polish Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+SPELLDIR = ..
+FILES = hr_HR.aff hr_HR.dic
+
+all: $SPELLDIR/hr.iso-8859-2.spl $SPELLDIR/pl.utf-8.spl \
+ $SPELLDIR/hr.cp1250.spl ../README_pl.txt
+
+$SPELLDIR/hr.iso-8859-2.spl : $VIM $FILES
+ :sys env LANG=hr_HR.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/hr hr_HR" -c q
+
+$SPELLDIR/hr.utf-8.spl : $VIM $FILES
+ :sys env LANG=hr_HR.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/hr hr_HR" -c q
+
+$SPELLDIR/hr.cp1250.spl : $VIM $FILES
+ :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/hr hr_HR" -c q
+
+../README_hr.txt: README_hr_HR.txt
+ :copy $source $target
+
+#
+# Fetching the files from OpenOffice.org.
+#
+OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
+:attr {fetch = $OODIR/%file%} hr_HR.zip
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+# This is a bit tricky, since the file name includes the date.
+hr_HR.aff hr_HR.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch hr_HR.zip
+ :sys $UNZIP hr_HR.zip
+ :delete hr_HR.zip
+ @if not os.path.exists('hr_HR.orig.aff'):
+ :copy hr_HR.aff hr_HR.orig.aff
+ @if not os.path.exists('hr_HR.orig.dic'):
+ :copy hr_HR.dic hr_HR.orig.dic
+ @if os.path.exists('hr_HR.diff'):
+ :sys patch <hr_HR.diff
+
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+ :assertpkg diff
+ :sys {force} diff -a -C 1 hr_HR.orig.aff hr_HR.aff >hr_HR.diff
+ :sys {force} diff -a -C 1 hr_HR.orig.dic hr_HR.dic >>hr_HR.diff
+
+
+# Check for updated spell files. When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+ :assertpkg unzip diff
+ :fetch hr_HR.zip
+ :mkdir tmp
+ :cd tmp
+ @try:
+ @import stat
+ :sys $UNZIP ../hr_HR.zip
+ :sys {force} diff ../hr_HR.orig.aff hr_HR.aff >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy hr_HR.aff ../hr_HR.new.aff
+ :sys {force} diff ../hr_HR.orig.dic hr_HR.dic >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy hr_HR.dic ../hr_HR.new.dic
+ @finally:
+ :cd ..
+ :delete {r}{f}{q} tmp
+ :delete hr_HR.zip
+
+
+# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/it/main.aap b/runtime/spell/it/main.aap
index 04e116fbf..ef541c45b 100644
--- a/runtime/spell/it/main.aap
+++ b/runtime/spell/it/main.aap
@@ -9,15 +9,15 @@
SPELLDIR = ..
FILES = it_IT.aff it_IT.dic
-all: $(SPELLDIR)/it.latin1.spl $(SPELLDIR)/it.utf-8.spl ../README_it.txt
+all: $SPELLDIR/it.latin1.spl $SPELLDIR/it.utf-8.spl ../README_it.txt
-$(SPELLDIR)/it.latin1.spl : $(VIM) $(FILES)
+$SPELLDIR/it.latin1.spl : $VIM $FILES
:sys env LANG=it_IT.ISO8859-1
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/it it_IT" -c q
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/it it_IT" -c q
-$(SPELLDIR)/it.utf-8.spl : $(VIM) $(FILES)
+$SPELLDIR/it.utf-8.spl : $VIM $FILES
:sys env LANG=it_IT.UTF-8
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/it it_IT" -c q
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/it it_IT" -c q
../README_it.txt : README_it_IT.txt
:copy $source $target
@@ -26,14 +26,14 @@ $(SPELLDIR)/it.utf-8.spl : $(VIM) $(FILES)
# Fetching the files from OpenOffice.org.
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
-:attr {fetch = $(OODIR)/%file%} it_IT.zip
+:attr {fetch = $OODIR/%file%} it_IT.zip
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
it_IT.aff it_IT.dic: {buildcheck=}
:assertpkg unzip patch
:fetch it_IT.zip
- :sys $(UNZIP) it_IT.zip
+ :sys $UNZIP it_IT.zip
:delete it_IT.zip
@if not os.path.exists('it_IT.orig.aff'):
:copy it_IT.aff it_IT.orig.aff
@@ -62,7 +62,7 @@ check:
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../it_IT.zip
+ :sys $UNZIP ../it_IT.zip
:sys {force} diff ../it_IT.orig.aff it_IT.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy it_IT.aff ../it_IT.new.aff
diff --git a/runtime/spell/main.aap b/runtime/spell/main.aap
index 44d19906b..68864b89e 100644
--- a/runtime/spell/main.aap
+++ b/runtime/spell/main.aap
@@ -1,7 +1,7 @@
# "aap": generate all the .spl files
# "aap diff" create all the diff files
-LANG = de en fr he it nl pl yi
+LANG = af bg ca cs da de en fr he hr it nl ny pl sk yi
diff: $*LANG/diff
:print done
diff --git a/runtime/spell/nl/main.aap b/runtime/spell/nl/main.aap
index b41416143..02ae49d57 100644
--- a/runtime/spell/nl/main.aap
+++ b/runtime/spell/nl/main.aap
@@ -9,15 +9,15 @@
SPELLDIR = ..
FILES = nl_NL.aff nl_NL.dic
-all: $(SPELLDIR)/nl.latin1.spl $(SPELLDIR)/nl.utf-8.spl ../README_nl.txt
+all: $SPELLDIR/nl.latin1.spl $SPELLDIR/nl.utf-8.spl ../README_nl.txt
-$(SPELLDIR)/nl.latin1.spl : $(VIM) $(FILES)
+$SPELLDIR/nl.latin1.spl : $VIM $FILES
:sys env LANG=nl_NL.ISO8859-1
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/nl nl_NL" -c q
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/nl nl_NL" -c q
-$(SPELLDIR)/nl.utf-8.spl : $(VIM) $(FILES)
+$SPELLDIR/nl.utf-8.spl : $VIM $FILES
:sys env LANG=nl_NL.UTF-8
- $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/nl nl_NL" -c q
+ $VIM -u NONE -e -c "mkspell! $SPELLDIR/nl nl_NL" -c q
../README_nl.txt : README_nl_NL.txt
:copy $source $target
@@ -26,19 +26,19 @@ $(SPELLDIR)/nl.utf-8.spl : $(VIM) $(FILES)
# Fetching the files from OpenOffice.org.
#
OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
-:attr {fetch = $(OODIR)/%file%} nl_NL.zip
+:attr {fetch = $OODIR/%file%} nl_NL.zip
# The files don't depend on the .zip file so that we can delete it.
# Only download the zip file if the targets don't exist.
nl_NL.aff nl_NL.dic: {buildcheck=}
:assertpkg unzip patch
:fetch nl_NL.zip
- :sys $(UNZIP) nl_NL.zip
+ :sys $UNZIP nl_NL.zip
:delete nl_NL.zip
@if not os.path.exists('nl_NL.orig.aff'):
- :copy nl_NL.aff nl_NL.orig.aff
+ :copy nl_NL.aff nl_NL.orig.aff
@if not os.path.exists('nl_NL.orig.dic'):
- :copy nl_NL.dic nl_NL.orig.dic
+ :copy nl_NL.dic nl_NL.orig.dic
@if os.path.exists('nl_NL.diff'):
:sys patch <nl_NL.diff
@@ -62,7 +62,7 @@ check:
:cd tmp
@try:
@import stat
- :sys $(UNZIP) ../nl_NL.zip
+ :sys $UNZIP ../nl_NL.zip
:sys {force} diff ../nl_NL.orig.aff nl_NL.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy nl_NL.aff ../nl_NL.new.aff
diff --git a/runtime/spell/ny/main.aap b/runtime/spell/ny/main.aap
new file mode 100644
index 000000000..e7fcbf7b7
--- /dev/null
+++ b/runtime/spell/ny/main.aap
@@ -0,0 +1,82 @@
+# Aap recipe for Dutch Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+SPELLDIR = ..
+FILES = ny_MW.aff ny_MW.dic
+
+all: $SPELLDIR/ny.iso-8859-14.spl $SPELLDIR/ny.utf-8.spl \
+ $SPELLDIR/ny.ascii.spl ../README_ny.txt
+
+$SPELLDIR/ny.iso-8859-14.spl : $VIM $FILES
+ :sys $VIM -u NONE -e -c "set enc=iso-8859-14"
+ -c "mkspell! $SPELLDIR/ny ny_MW" -c q
+
+$SPELLDIR/ny.utf-8.spl : $VIM $FILES
+ :sys $VIM -u NONE -e -c "set enc=utf-8"
+ -c "mkspell! $SPELLDIR/ny ny_MW" -c q
+
+$SPELLDIR/ny.ascii.spl : $VIM $FILES
+ :sys $VIM -u NONE -e -c "mkspell! -ascii $SPELLDIR/ny ny_MW" -c q
+
+../README_ny.txt : README_ny_MW.txt
+ :copy $source $target
+
+#
+# Fetching the files from OpenOffice.org.
+#
+OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
+:attr {fetch = $OODIR/%file%} ny_MW.zip
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+ny_MW.aff ny_MW.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch ny_MW.zip
+ :sys $UNZIP ny_MW.zip
+ :delete ny_MW.zip
+ @if not os.path.exists('ny_MW.orig.aff'):
+ :copy ny_MW.aff ny_MW.orig.aff
+ @if not os.path.exists('ny_MW.orig.dic'):
+ :copy ny_MW.dic ny_MW.orig.dic
+ @if os.path.exists('ny_MW.diff'):
+ :sys patch <ny_MW.diff
+
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+ :assertpkg diff
+ :sys {force} diff -a -C 1 ny_MW.orig.aff ny_MW.aff >ny_MW.diff
+ :sys {force} diff -a -C 1 ny_MW.orig.dic ny_MW.dic >>ny_MW.diff
+
+
+# Check for updated OpenOffice spell files. When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+ :assertpkg unzip diff
+ :fetch ny_MW.zip
+ :mkdir tmp
+ :cd tmp
+ @try:
+ @import stat
+ :sys $UNZIP ../ny_MW.zip
+ :sys {force} diff ../ny_MW.orig.aff ny_MW.aff >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy ny_MW.aff ../ny_MW.new.aff
+ :sys {force} diff ../ny_MW.orig.dic ny_MW.dic >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy ny_MW.dic ../ny_MW.new.dic
+ @finally:
+ :cd ..
+ :delete {r}{f}{q} tmp
+ :delete ny_MW.zip
+
+
+# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/pl/main.aap b/runtime/spell/pl/main.aap
index 6916df340..e33acf802 100644
--- a/runtime/spell/pl/main.aap
+++ b/runtime/spell/pl/main.aap
@@ -9,17 +9,17 @@
SPELLDIR = ..
FILES = pl_PL.aff pl_PL.dic
-all: $(SPELLDIR)/pl.iso-8859-2.spl $(SPELLDIR)/pl.utf-8.spl \
- $(SPELLDIR)/pl.cp1250.spl ../README_pl.txt
+all: $SPELLDIR/pl.iso-8859-2.spl $SPELLDIR/pl.utf-8.spl \
+ $SPELLDIR/pl.cp1250.spl ../README_pl.txt
-$(SPELLDIR)/pl.iso-8859-2.spl : $(VIM) $(FILES)
- :sys env LANG=pl_PL.ISO8859-2 $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/pl pl_PL" -c q
+$SPELLDIR/pl.iso-8859-2.spl : $VIM $FILES
+ :sys env LANG=pl_PL.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/pl pl_PL" -c q
-$(SPELLDIR)/pl.utf-8.spl : $(VIM) $(FILES)
- :sys env LANG=pl_PL.UTF-8 $(VIM) -u NONE -e -c "mkspell! $(SPELLDIR)/pl pl_PL" -c q
+$SPELLDIR/pl.utf-8.spl : $VIM $FILES
+ :sys env LANG=pl_PL.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/pl pl_PL" -c q
-$(SPELLDIR)/pl.cp1250.spl : $(VIM) $(FILES)
- :sys $(VIM) -u NONE -e -c "set enc=cp1250" -c "mkspell! $(SPELLDIR)/pl pl_PL" -c q
+$SPELLDIR/pl.cp1250.spl : $VIM $FILES
+ :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/pl pl_PL" -c q
../README_pl.txt: README_pl_PL.txt
:copy $source $target
@@ -28,7 +28,7 @@ $(SPELLDIR)/pl.cp1250.spl : $(VIM) $(FILES)
# Fetching the files from OpenOffice.org.
#
#OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
-#:attr {fetch = $(OODIR)/%file%} pl_PL.zip
+#:attr {fetch = $OODIR/%file%} pl_PL.zip
#
# Fetching the files from
@@ -43,24 +43,24 @@ pl_PL.aff pl_PL.dic: {buildcheck=}
@from time import strftime, gmtime, time
@for day in range(20):
date = `strftime('%Y%m%d', gmtime(time() - day * 24 * 60 * 60))`
- base = alt-myspell-pl-$(date)
- fname = $(base).tar.bz2
- :attr {fetch = $(HTTPDIR)/%file%} $(fname)
+ base = alt-myspell-pl-$date
+ fname = $base.tar.bz2
+ :attr {fetch = $HTTPDIR/%file%} $fname
@try:
- :fetch $(fname)
+ :fetch $fname
ok = 1
@except:
ok = 0
@if ok:
@break
- :sys bunzip2 -c $(fname) | tar xf -
- :move $(base)/* .
- :deldir $(base)
- :delete $(fname)
+ :sys bunzip2 -c $fname | tar xf -
+ :move $base/* .
+ :deldir $base
+ :delete $fname
@if not os.path.exists('pl_PL.orig.aff'):
- :copy pl_PL.aff pl_PL.orig.aff
+ :copy pl_PL.aff pl_PL.orig.aff
@if not os.path.exists('pl_PL.orig.dic'):
- :copy pl_PL.dic pl_PL.orig.dic
+ :copy pl_PL.dic pl_PL.orig.dic
@if os.path.exists('pl_PL.diff'):
:sys patch <pl_PL.diff
@@ -74,17 +74,29 @@ diff:
:sys {force} diff -a -C 1 pl_PL.orig.dic pl_PL.dic >>pl_PL.diff
-# Check for updated OpenOffice spell files. When there are changes the
+# Check for updated spell files. When there are changes the
# ".new.aff" and ".new.dic" files are left behind for manual inspection.
check:
- :assertpkg unzip diff
- :fetch pl_PL.zip
- :mkdir tmp
- :cd tmp
+ :assertpkg tar bunzip2 diff
+ @from time import strftime, gmtime, time
+ @for day in range(20):
+ date = `strftime('%Y%m%d', gmtime(time() - day * 24 * 60 * 60))`
+ base = alt-myspell-pl-$date
+ fname = $base.tar.bz2
+ :attr {fetch = $HTTPDIR/%file%} $fname
+ @try:
+ :fetch $fname
+ ok = 1
+ @except:
+ ok = 0
+ @if ok:
+ @break
+ :sys bunzip2 -c $fname | tar xf -
+ :cd $base
@try:
@import stat
- :sys $(UNZIP) ../pl_PL.zip
+ :sys $UNZIP ../pl_PL.zip
:sys {force} diff ../pl_PL.orig.aff pl_PL.aff >d
@if os.stat('d')[stat.ST_SIZE] > 0:
:copy pl_PL.aff ../pl_PL.new.aff
@@ -93,8 +105,8 @@ check:
:copy pl_PL.dic ../pl_PL.new.dic
@finally:
:cd ..
- :delete {r}{f}{q} tmp
- :delete pl_PL.zip
+ :delete {r}{f}{q} $base
+ :delete $fname
# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/sk/main.aap b/runtime/spell/sk/main.aap
new file mode 100644
index 000000000..b18d195c1
--- /dev/null
+++ b/runtime/spell/sk/main.aap
@@ -0,0 +1,81 @@
+# Aap recipe for Czech Vim spell files.
+
+# Use a freshly compiled Vim if it exists.
+@if os.path.exists('../../../src/vim'):
+ VIM = ../../../src/vim
+@else:
+ :progsearch VIM vim
+
+SPELLDIR = ..
+FILES = sk_SK.aff sk_SK.dic
+
+all: $SPELLDIR/sk.iso-8859-2.spl $SPELLDIR/sk.utf-8.spl \
+ $SPELLDIR/sk.cp1250.spl ../README_sk.txt
+
+$SPELLDIR/sk.iso-8859-2.spl : $VIM $FILES
+ :sys env LANG=sk_SK.ISO8859-2 $VIM -u NONE -e -c "mkspell! $SPELLDIR/sk sk_SK" -c q
+
+$SPELLDIR/sk.utf-8.spl : $VIM $FILES
+ :sys env LANG=sk_SK.UTF-8 $VIM -u NONE -e -c "mkspell! $SPELLDIR/sk sk_SK" -c q
+
+$SPELLDIR/sk.cp1250.spl : $VIM $FILES
+ :sys $VIM -u NONE -e -c "set enc=cp1250" -c "mkspell! $SPELLDIR/sk sk_SK" -c q
+
+../README_sk.txt: README_sk_SK.txt
+ :copy $source $target
+
+#
+# Fetching the files from OpenOffice.org.
+#
+OODIR = http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
+:attr {fetch = $OODIR/%file%} sk_SK.zip
+
+# The files don't depend on the .zip file so that we can delete it.
+# Only download the zip file if the targets don't exist.
+# This is a bit tricky, since the file name includes the date.
+sk_SK.aff sk_SK.dic: {buildcheck=}
+ :assertpkg unzip patch
+ :fetch sk_SK.zip
+ :sys $UNZIP sk_SK.zip
+ :delete sk_SK.zip
+ @if not os.path.exists('sk_SK.orig.aff'):
+ :copy sk_SK.aff sk_SK.orig.aff
+ @if not os.path.exists('sk_SK.orig.dic'):
+ :copy sk_SK.dic sk_SK.orig.dic
+ @if os.path.exists('sk_SK.diff'):
+ :sys patch <sk_SK.diff
+
+
+# Generate diff files, so that others can get the OpenOffice files and apply
+# the diffs to get the Vim versions.
+
+diff:
+ :assertpkg diff
+ :sys {force} diff -a -C 1 sk_SK.orig.aff sk_SK.aff >sk_SK.diff
+ :sys {force} diff -a -C 1 sk_SK.orig.dic sk_SK.dic >>sk_SK.diff
+
+
+# Check for updated OpenOffice spell files. When there are changes the
+# ".new.aff" and ".new.dic" files are left behind for manual inspection.
+
+check:
+ :assertpkg unzip diff
+ :fetch sk_SK.zip
+ :mkdir tmp
+ :cd tmp
+ @try:
+ @import stat
+ :sys $UNZIP ../sk_SK.zip
+ :sys {force} diff ../sk_SK.orig.aff sk_SK.aff >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy sk_SK.aff ../sk_SK.new.aff
+ :sys {force} diff ../sk_SK.orig.dic sk_SK.dic >d
+ @if os.stat('d')[stat.ST_SIZE] > 0:
+ :copy sk_SK.dic ../sk_SK.new.dic
+ @finally:
+ :cd ..
+ :delete {r}{f}{q} tmp
+ :delete sk_SK.zip
+
+
+# vim: set sts=4 sw=4 :
diff --git a/runtime/spell/sk/sk_SK.diff b/runtime/spell/sk/sk_SK.diff
new file mode 100644
index 000000000..d279fd329
--- /dev/null
+++ b/runtime/spell/sk/sk_SK.diff
@@ -0,0 +1,18 @@
+*** sk_SK.orig.aff Sun Aug 14 16:48:21 2005
+--- sk_SK.aff Sun Aug 14 16:50:08 2005
+***************
+*** 4,5 ****
+--- 4,9 ----
+
++ FOL ±¢³µ¶¨¹º»¼¾¿±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ LOW ±¢³µ¶¨¹º»¼¾¿±²³´µ¶·¸¹º»¼½¾¿àáâãäåæçèéêëìíîïðñòóôõöøùúûüýþßÿ
++ UPP ¡¢£¥¦¨©ª«¬®¯±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßÿ
++
+ PFX N Y 1
+*** sk_SK.orig.dic Sun Aug 14 16:48:21 2005
+--- sk_SK.dic Sun Aug 14 16:52:23 2005
+***************
+*** 166567,166568 ****
+ ¾viaka»/NX
+- 166567
+--- 166567 ----
diff --git a/runtime/spell/yi/main.aap b/runtime/spell/yi/main.aap
index 8160e8383..31d057e01 100644
--- a/runtime/spell/yi/main.aap
+++ b/runtime/spell/yi/main.aap
@@ -14,7 +14,7 @@ all: $SPELLDIR/yi.utf-8.spl ../README_yi.txt
$SPELLDIR/yi.utf-8.spl : $VIM $FILES
:sys $VIM -u NONE -e -c "set enc=utf-8"
- -c "mkspell! $(SPELLDIR)/yi yi" -c q
+ -c "mkspell! $SPELLDIR/yi yi" -c q
../README_yi.txt : README.txt
:copy $source $target
diff --git a/runtime/syntax/verilogams.vim b/runtime/syntax/verilogams.vim
new file mode 100644
index 000000000..7141eca23
--- /dev/null
+++ b/runtime/syntax/verilogams.vim
@@ -0,0 +1,142 @@
+" Vim syntax file
+" Language: Verilog-AMS
+" Maintainer: S. Myles Prather <smprather@gmail.com>
+" Last Update: Sun Aug 14 03:58:00 CST 2003
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Set the local value of the 'iskeyword' option
+if version >= 600
+ setlocal iskeyword=@,48-57,_,192-255
+else
+ set iskeyword=@,48-57,_,192-255
+endif
+
+" Annex B.1 'All keywords'
+syn keyword verilogamsStatement above abs absdelay acos acosh ac_stim
+syn keyword verilogamsStatement always analog analysis and asin
+syn keyword verilogamsStatement asinh assign atan atan2 atanh branch
+syn keyword verilogamsStatement buf bufif1 ceil cmos
+syn keyword verilogamsStatement connectrules cos cosh cross ddt ddx deassign
+syn keyword verilogamsStatement defparam disable discipline
+syn keyword verilogamsStatement driver_update edge enddiscipline
+syn keyword verilogamsStatement endconnectrules endmodule endfunction
+syn keyword verilogamsStatement endnature endparamset endprimitive endspecify
+syn keyword verilogamsStatement endtable endtask event exp final_step
+syn keyword verilogamsStatement flicker_noise floor flow force fork
+syn keyword verilogamsStatement function generate genvar highz0
+syn keyword verilogamsStatement highz1 hypot idt idtmod if ifnone initial
+syn keyword verilogamsStatement initial_step inout input join
+syn keyword verilogamsStatement laplace_nd laplace_np laplace_zd laplace_zp
+syn keyword verilogamsStatement large last_crossing limexp ln localparam log
+syn keyword verilogamsStatement macromodule max medium min module nand nature
+syn keyword verilogamsStatement negedge net_resolution nmos noise_table nor not
+syn keyword verilogamsStatement notif0 notif1 or output paramset pmos
+syn keyword verilogamsType parameter real integer electrical input output
+syn keyword verilogamsType inout reg tri tri0 tri1 triand trior trireg
+syn keyword verilogamsType string from exclude aliasparam ground
+syn keyword verilogamsStatement posedge potential pow primitive pull0 pull1
+syn keyword verilogamsStatement pullup pulldown rcmos release
+syn keyword verilogamsStatement rnmos rpmos rtran rtranif0 rtranif1
+syn keyword verilogamsStatement scalared sin sinh slew small specify specparam
+syn keyword verilogamsStatement sqrt strong0 strong1 supply0 supply1
+syn keyword verilogamsStatement table tan tanh task time timer tran tranif0
+syn keyword verilogamsStatement tranif1 transition
+syn keyword verilogamsStatement vectored wait wand weak0 weak1
+syn keyword verilogamsStatement white_noise wire wor wreal xnor xor zi_nd
+syn keyword verilogamsStatement zi_np zi_zd
+syn keyword verilogamsRepeat forever repeat while for
+syn keyword verilogamsLabel begin end
+syn keyword verilogamsConditional if else case casex casez default endcase
+syn match verilogamsConstant ":inf"lc=1
+syn match verilogamsConstant "-inf"lc=1
+" Annex B.2 Discipline/nature
+syn keyword verilogamsStatement abstol access continuous ddt_nature discrete
+syn keyword verilogamsStatement domain idt_nature units
+" Annex B.3 Connect Rules
+syn keyword verilogamsStatement connect merged resolveto split
+
+syn match verilogamsOperator "[&|~><!)(*#%@+/=?:;}{,.\^\-\[\]]"
+syn match verilogamsOperator "<+"
+syn match verilogamsStatement "[vV]("me=e-1
+syn match verilogamsStatement "[iI]("me=e-1
+
+syn keyword verilogamsTodo contained TODO
+syn region verilogamsComment start="/\*" end="\*/" contains=verilogamsTodo
+syn match verilogamsComment "//.*" contains=verilogamsTodo
+
+syn match verilogamsGlobal "`celldefine"
+syn match verilogamsGlobal "`default_nettype"
+syn match verilogamsGlobal "`define"
+syn match verilogamsGlobal "`else"
+syn match verilogamsGlobal "`elsif"
+syn match verilogamsGlobal "`endcelldefine"
+syn match verilogamsGlobal "`endif"
+syn match verilogamsGlobal "`ifdef"
+syn match verilogamsGlobal "`ifndef"
+syn match verilogamsGlobal "`include"
+syn match verilogamsGlobal "`line"
+syn match verilogamsGlobal "`nounconnected_drive"
+syn match verilogamsGlobal "`resetall"
+syn match verilogamsGlobal "`timescale"
+syn match verilogamsGlobal "`unconnected_drive"
+syn match verilogamsGlobal "`undef"
+syn match verilogamsSystask "$[a-zA-Z0-9_]\+\>"
+
+syn match verilogamsConstant "\<[A-Z][A-Z0-9_]\+\>"
+
+syn match verilogamsNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>"
+syn match verilogamsNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>"
+syn match verilogamsNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>"
+syn match verilogamsNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>"
+syn match verilogamsNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>"
+
+syn region verilogamsString start=+"+ skip=+\\"+ end=+"+ contains=verilogamsEscape
+syn match verilogamsEscape +\\[nt"\\]+ contained
+syn match verilogamsEscape "\\\o\o\=\o\=" contained
+
+"Modify the following as needed. The trade-off is performance versus
+"functionality.
+syn sync lines=50
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_verilogams_syn_inits")
+ if version < 508
+ let did_verilogams_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ " The default highlighting.
+ HiLink verilogamsCharacter Character
+ HiLink verilogamsConditional Conditional
+ HiLink verilogamsRepeat Repeat
+ HiLink verilogamsString String
+ HiLink verilogamsTodo Todo
+ HiLink verilogamsComment Comment
+ HiLink verilogamsConstant Constant
+ HiLink verilogamsLabel Label
+ HiLink verilogamsNumber Number
+ HiLink verilogamsOperator Special
+ HiLink verilogamsStatement Statement
+ HiLink verilogamsGlobal Define
+ HiLink verilogamsDirective SpecialComment
+ HiLink verilogamsEscape Special
+ HiLink verilogamsType Type
+ HiLink verilogamsSystask Function
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "verilogams"
+
+" vim: ts=8
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 4b7d6fd46..52104f41c 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -425,6 +425,11 @@ ex_sort(eap)
nrs[lnum - eap->line1].col_nr = col;
nrs[lnum - eap->line1].lnum = lnum;
+
+ if (regmatch.regprog != NULL)
+ fast_breakcheck();
+ if (got_int)
+ goto theend;
}
/* Allocate a buffer that can hold the longest line. */
@@ -432,7 +437,7 @@ ex_sort(eap)
if (sortbuf == NULL)
goto theend;
- /* sort the array of line numbers */
+ /* Sort the array of line numbers. Note: can't be interrupted! */
qsort((void *)nrs, count, sizeof(sorti_T), sort_compare);
/* Insert the lines in the sorted order below the last one. */
@@ -448,6 +453,9 @@ ex_sort(eap)
if (unique)
STRCPY(sortbuf, s);
}
+ fast_breakcheck();
+ if (got_int)
+ goto theend;
}
/* delete the original lines if appending worked */
@@ -472,6 +480,8 @@ theend:
vim_free(nrs);
vim_free(sortbuf);
vim_free(regmatch.regprog);
+ if (got_int)
+ EMSG(_(e_interr));
}
/*
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 5ba7d8b07..cd40a689d 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1647,16 +1647,21 @@ cmdline_changed:
if (i != 0)
{
+ pos_T save_pos = curwin->w_cursor;
+
/*
* First move cursor to end of match, then to start. This
* moves the whole match onto the screen when 'nowrap' is set.
*/
- i = curwin->w_cursor.col;
curwin->w_cursor.lnum += search_match_lines;
curwin->w_cursor.col = search_match_endcol;
+ if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
+ {
+ curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
+ coladvance((colnr_T)MAXCOL);
+ }
validate_cursor();
- curwin->w_cursor.lnum -= search_match_lines;
- curwin->w_cursor.col = i;
+ curwin->w_cursor = save_pos;
}
validate_cursor();
diff --git a/src/getchar.c b/src/getchar.c
index 085fc4dc6..69cebaee5 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -3325,6 +3325,9 @@ do_map(maptype, arg, mode, abbrev)
mp->m_noremap = noremap;
mp->m_silent = silent;
mp->m_mode = mode;
+#ifdef FEAT_EVAL
+ mp->m_script_ID = current_SID;
+#endif
did_it = TRUE;
}
}
@@ -3407,6 +3410,9 @@ do_map(maptype, arg, mode, abbrev)
mp->m_noremap = noremap;
mp->m_silent = silent;
mp->m_mode = mode;
+#ifdef FEAT_EVAL
+ mp->m_script_ID = current_SID;
+#endif
/* add the new entry in front of the abbrlist or maphash[] list */
if (abbrev)
@@ -3676,6 +3682,10 @@ showmap(mp, local)
msg_puts_attr((char_u *)"<Nop>", hl_attr(HLF_8));
else
msg_outtrans_special(mp->m_str, FALSE);
+#ifdef FEAT_EVAL
+ if (p_verbose > 0)
+ last_set_msg(mp->m_script_ID);
+#endif
out_flush(); /* show one line at a time */
}
diff --git a/src/mbyte.c b/src/mbyte.c
index 61fd6980a..5fb45568b 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -2876,6 +2876,10 @@ enc_canonize(enc)
/* Skip "2byte-" and "8bit-". */
p = enc_skip(r);
+ /* Change "microsoft-cp" to "cp". Used in some spell files. */
+ if (STRNCMP(p, "microsoft-cp", 12) == 0)
+ mch_memmove(p, p + 10, STRLEN(p + 10) + 1);
+
/* "iso8859" -> "iso-8859" */
if (STRNCMP(p, "iso8859", 7) == 0)
{
diff --git a/src/regexp.c b/src/regexp.c
index c111778fa..1ff5a069b 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -606,6 +606,7 @@ static int reg_magic; /* magicness of the pattern: */
static int reg_string; /* matching with a string instead of a buffer
line */
+static int reg_strict; /* "[abc" is illegal */
/*
* META contains all characters that may be magic, except '^' and '$'.
@@ -1132,6 +1133,7 @@ regcomp_start(expr, re_flags)
else
reg_magic = MAGIC_OFF;
reg_string = (re_flags & RE_STRING);
+ reg_strict = (re_flags & RE_STRICT);
num_complex_braces = 0;
regnpar = 1;
@@ -2253,6 +2255,9 @@ collection:
*flagp |= HASWIDTH | SIMPLE;
break;
}
+ else if (reg_strict)
+ EMSG_M_RET_NULL(_("E769: Missing ] after %s["),
+ reg_magic > MAGIC_OFF);
}
/* FALLTHROUGH */
@@ -3172,6 +3177,9 @@ reg_getline(lnum)
* can't go before line 1 */
if (reg_firstlnum + lnum < 1)
return NULL;
+ if (reg_firstlnum + lnum > reg_buf->b_ml.ml_line_count)
+ /* Must have matched the "\n" in the last line. */
+ return (char_u *)"";
return ml_get_buf(reg_buf, reg_firstlnum + lnum, FALSE);
}
@@ -3455,8 +3463,8 @@ vim_regexec_both(line, col)
/* if not currently on the first line, get it again */
if (reglnum != 0)
{
- regline = reg_getline((linenr_T)0);
reglnum = 0;
+ regline = reg_getline((linenr_T)0);
}
if (regline[col] == NUL)
break;
@@ -3723,7 +3731,8 @@ regmatch(scan)
op = OP(scan);
/* Check for character class with NL added. */
- if (WITH_NL(op) && *reginput == NUL && reglnum < reg_maxline)
+ if (!reg_line_lbr && WITH_NL(op) && *reginput == NUL
+ && reglnum <= reg_maxline)
{
reg_nextline();
}
@@ -4369,7 +4378,7 @@ regmatch(scan)
}
if (clnum == reg_endpos[no].lnum)
break; /* match and at end! */
- if (reglnum == reg_maxline)
+ if (reglnum >= reg_maxline)
{
status = RA_NOMATCH; /* text too short */
break;
@@ -4672,7 +4681,7 @@ regmatch(scan)
break;
case NEWL:
- if ((c != NUL || reglnum == reg_maxline)
+ if ((c != NUL || reglnum > reg_maxline || reg_line_lbr)
&& (c != '\n' || !reg_line_lbr))
status = RA_NOMATCH;
else if (reg_line_lbr)
@@ -5133,7 +5142,8 @@ regrepeat(p, maxcount)
++count;
mb_ptr_adv(scan);
}
- if (!WITH_NL(OP(p)) || reglnum == reg_maxline || count == maxcount)
+ if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr
+ || count == maxcount)
break;
++count; /* count the line-break */
reg_nextline();
@@ -5157,7 +5167,7 @@ regrepeat(p, maxcount)
}
else if (*scan == NUL)
{
- if (!WITH_NL(OP(p)) || reglnum == reg_maxline)
+ if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
break;
reg_nextline();
scan = reginput;
@@ -5186,7 +5196,7 @@ regrepeat(p, maxcount)
}
else if (*scan == NUL)
{
- if (!WITH_NL(OP(p)) || reglnum == reg_maxline)
+ if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
break;
reg_nextline();
scan = reginput;
@@ -5215,7 +5225,7 @@ regrepeat(p, maxcount)
}
else if (*scan == NUL)
{
- if (!WITH_NL(OP(p)) || reglnum == reg_maxline)
+ if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
break;
reg_nextline();
scan = reginput;
@@ -5240,7 +5250,7 @@ regrepeat(p, maxcount)
{
if (*scan == NUL)
{
- if (!WITH_NL(OP(p)) || reglnum == reg_maxline)
+ if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
break;
reg_nextline();
scan = reginput;
@@ -5270,7 +5280,7 @@ do_class:
#endif
if (*scan == NUL)
{
- if (!WITH_NL(OP(p)) || reglnum == reg_maxline)
+ if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
break;
reg_nextline();
scan = reginput;
@@ -5433,7 +5443,7 @@ do_class:
#endif
if (*scan == NUL)
{
- if (!WITH_NL(OP(p)) || reglnum == reg_maxline)
+ if (!WITH_NL(OP(p)) || reglnum > reg_maxline || reg_line_lbr)
break;
reg_nextline();
scan = reginput;
@@ -5462,7 +5472,7 @@ do_class:
case NEWL:
while (count < maxcount
- && ((*scan == NUL && reglnum < reg_maxline)
+ && ((*scan == NUL && reglnum <= reg_maxline && !reg_line_lbr)
|| (*scan == '\n' && reg_line_lbr)))
{
count++;
diff --git a/src/search.c b/src/search.c
index bc5da67bb..af3215b31 100644
--- a/src/search.c
+++ b/src/search.c
@@ -544,8 +544,13 @@ searchit(win, buf, pos, dir, pat, count, options, pat_use)
/* Watch out for the "col" being MAXCOL - 2, used in a closed fold. */
else if (has_mbyte && pos->lnum >= 1 && pos->lnum <= buf->b_ml.ml_line_count
&& pos->col < MAXCOL - 2)
- extra_col = (*mb_ptr2len)(ml_get_buf(buf, pos->lnum, FALSE)
- + pos->col);
+ {
+ ptr = ml_get_buf(buf, pos->lnum, FALSE) + pos->col;
+ if (*ptr == NUL)
+ extra_col = 1;
+ else
+ extra_col = (*mb_ptr2len)(ptr);
+ }
#endif
else
extra_col = 1;
diff --git a/src/spell.c b/src/spell.c
index 10390ece6..114e3f2aa 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -35,7 +35,7 @@
* original case. The second one is only used for keep-case words and is
* usually small.
*
- * There is one additional tree for when prefixes are not applied when
+ * There is one additional tree for when not all prefixes are applied when
* generating the .spl file. This tree stores all the possible prefixes, as
* if they were words. At each word (prefix) end the prefix nr is stored, the
* following word must support this prefix nr. And the condition nr is
@@ -72,21 +72,6 @@
#define RESCORE(word_score, sound_score) ((3 * word_score + sound_score) / 4)
/*
- * The double scoring mechanism is based on the principle that there are two
- * kinds of spelling mistakes:
- * 1. You know how to spell the word, but mistype something. This results in
- * a small editing distance (character swapped/omitted/inserted) and
- * possibly a word that sounds completely different.
- * 2. You don't know how to spell the word and type something that sounds
- * right. The edit distance can be big but the word is similar after
- * sound-folding.
- * Since scores for these two mistakes will be very different we use a list
- * for each.
- * The sound-folding is slow, only do double scoring when 'spellsuggest' is
- * "double".
- */
-
-/*
* Vim spell file format: <HEADER>
* <SUGGEST>
* <LWORDTREE>
@@ -98,9 +83,10 @@
* <charflagslen> <charflags>
* <fcharslen> <fchars>
* <midwordlen> <midword>
+ * <compoundlen> <compoundtype> <compoundinfo>
* <prefcondcnt> <prefcond> ...
*
- * <fileID> 10 bytes "VIMspell09"
+ * <fileID> 10 bytes "VIMspell10"
* <regioncnt> 1 byte number of regions following (8 supported)
* <regionname> 2 bytes Region name: ca, au, etc. Lower case.
* First <regionname> is region 1.
@@ -116,6 +102,17 @@
* <midword> N bytes Characters that are word characters only when used
* in the middle of a word.
*
+ * <compoundlen> 2 bytes Number of bytes following for compound info (can
+ * be used to skip it when it's not understood).
+ *
+ * <compoundtype 1 byte 1: compound words using <comp1minlen> and
+ * <comp1flags>
+ *
+ * <comp1minlen> 1 byte minimal word length for compounding
+ *
+ * <comp1flags> N bytes flags used for compounding words
+ *
+ *
* <prefcondcnt> 2 bytes Number of <prefcond> items following.
*
* <prefcond> : <condlen> <condstr>
@@ -182,16 +179,16 @@
* follow in sorted order.
*
* <sibling>: <byte> [ <nodeidx> <xbyte>
- * | <flags> [<flags2>] [<region>] [<prefixID>]
- * | [<pflags>] <prefixID> <prefcondnr> ]
+ * | <flags> [<flags2>] [<region>] [<affixID>]
+ * | [<pflags>] <affixID> <prefcondnr> ]
*
* <byte> 1 byte Byte value of the sibling. Special cases:
* BY_NOFLAGS: End of word without flags and for all
* regions.
- * For PREFIXTREE <prefixID> and
+ * For PREFIXTREE <affixID> and
* <prefcondnr> follow.
* BY_FLAGS: End of word, <flags> follow.
- * For PREFIXTREE <pflags>, <prefixID>
+ * For PREFIXTREE <pflags>, <affixID>
* and <prefcondnr> follow.
* BY_FLAGS2: End of word, <flags> and <flags2>
* follow. Not used in PREFIXTREE.
@@ -210,7 +207,7 @@
* WF_RARE rare word
* WF_BANNED bad word
* WF_REGION <region> follows
- * WF_PFX <prefixID> follows
+ * WF_AFX <affixID> follows
*
* <flags2> 1 byte Only used when there are postponed prefixes.
* Bitmask of:
@@ -225,7 +222,7 @@
* omitted it's valid in all regions.
* Lowest bit is for region 1.
*
- * <prefixID> 1 byte ID of prefix that can be used with this word. For
+ * <affixID> 1 byte ID of affix that can be used with this word. In
* PREFIXTREE used for the required prefix ID.
*
* <prefcondnr> 2 bytes Prefix condition number, index in <prefcond> list
@@ -265,7 +262,7 @@ typedef long idx_T;
#define WF_ALLCAP 0x04 /* word must be all capitals */
#define WF_RARE 0x08 /* rare word */
#define WF_BANNED 0x10 /* bad word */
-#define WF_PFX 0x20 /* prefix ID follows */
+#define WF_AFX 0x20 /* affix ID follows */
#define WF_FIXCAP 0x40 /* keep-case word, allcap not allowed */
#define WF_KEEPCAP 0x80 /* keep-case word */
@@ -279,7 +276,7 @@ typedef long idx_T;
#define WFP_NC 0x02 /* prefix is not combining */
#define WFP_UP 0x04 /* to-upper prefix */
-/* flags for postponed prefixes. Must be above prefixID (one byte)
+/* Flags for postponed prefixes. Must be above affixID (one byte)
* and prefcondnr (two bytes). */
#define WF_RAREPFX (WFP_RARE << 24) /* in sl_pidxs: flag for rare
* postponed prefix */
@@ -343,8 +340,8 @@ typedef short salfirst_T;
* The "idxs" array stores the index of the child node corresponding to the
* byte in "byts".
* Exception: when the byte is zero, the word may end here and "idxs" holds
- * the flags, region mask and prefixID for the word. There may be several
- * zeros in sequence for alternative flag/region combinations.
+ * the flags, region mask and affixID for the word. There may be several
+ * zeros in sequence for alternative flag/region/affixID combinations.
*/
typedef struct slang_S slang_T;
struct slang_S
@@ -365,6 +362,9 @@ struct slang_S
char_u *sl_midword; /* MIDWORD string or NULL */
+ int sl_compminlen; /* COMPOUNDMIN */
+ char_u *sl_compflags; /* COMPOUNDFLAGS (NULL when no compounding) */
+
int sl_prefixcnt; /* number of items in "sl_prefprog" */
regprog_T **sl_prefprog; /* table with regprogs for prefixes */
@@ -419,7 +419,7 @@ typedef struct langp_S
#define SP_LOCAL 2
#define SP_BAD 3
-#define VIMSPELLMAGIC "VIMspell09" /* string at start of Vim spell file */
+#define VIMSPELLMAGIC "VIMspell10" /* string at start of Vim spell file */
#define VIMSPELLMAGICL 10
/* file used for "zG" and "zW" */
@@ -510,7 +510,7 @@ typedef struct matchinf_S
/* for when checking word after a prefix */
int mi_prefarridx; /* index in sl_pidxs with list of
- prefixID/condition */
+ affixID/condition */
int mi_prefcnt; /* number of entries at mi_prefarridx */
int mi_prefixlen; /* byte length of prefix */
#ifdef FEAT_MBYTE
@@ -520,6 +520,9 @@ typedef struct matchinf_S
# define mi_cprefixlen mi_prefixlen /* it's the same value */
#endif
+ /* for when checking a compound word */
+ int mi_compoff; /* start of following word offset */
+
/* others */
int mi_result; /* result so far: SP_BAD, SP_OK, etc. */
int mi_capflags; /* WF_ONECAP WF_ALLCAP WF_KEEPCAP */
@@ -614,9 +617,11 @@ typedef struct trystate_S
#define NOPREFIX 0xff /* not using prefixes */
/* mode values for find_word */
-#define FIND_FOLDWORD 0 /* find word case-folded */
-#define FIND_KEEPWORD 1 /* find keep-case word */
-#define FIND_PREFIX 2 /* find word after prefix */
+#define FIND_FOLDWORD 0 /* find word case-folded */
+#define FIND_KEEPWORD 1 /* find keep-case word */
+#define FIND_PREFIX 2 /* find word after prefix */
+#define FIND_COMPOUND 3 /* find case-folded compound word */
+#define FIND_KEEPCOMPOUND 4 /* find keep-case compound word */
static slang_T *slang_alloc __ARGS((char_u *lang));
static void slang_free __ARGS((slang_T *lp));
@@ -928,14 +933,19 @@ find_word(mip, mode)
unsigned flags;
char_u *byts;
idx_T *idxs;
+ int word_ends;
- if (mode == FIND_KEEPWORD)
+ if (mode == FIND_KEEPWORD || mode == FIND_KEEPCOMPOUND)
{
/* Check for word with matching case in keep-case tree. */
ptr = mip->mi_word;
flen = 9999; /* no case folding, always enough bytes */
byts = slang->sl_kbyts;
idxs = slang->sl_kidxs;
+
+ if (mode == FIND_KEEPCOMPOUND)
+ /* Skip over the previously found word(s). */
+ wlen += mip->mi_compoff;
}
else
{
@@ -951,6 +961,13 @@ find_word(mip, mode)
wlen = mip->mi_prefixlen;
flen -= mip->mi_prefixlen;
}
+ else if (mode == FIND_COMPOUND)
+ {
+ /* Skip over the previously found word(s). */
+ wlen = mip->mi_compoff;
+ flen -= mip->mi_compoff;
+ }
+
}
if (byts == NULL)
@@ -1058,7 +1075,13 @@ find_word(mip, mode)
continue; /* not at first byte of character */
#endif
if (spell_iswordp(ptr + wlen, mip->mi_buf))
- continue; /* next char is a word character */
+ {
+ if (slang->sl_compflags == NULL)
+ continue; /* next char is a word character */
+ word_ends = FALSE;
+ }
+ else
+ word_ends = TRUE;
#ifdef FEAT_MBYTE
if (mode != FIND_KEEPWORD && has_mbyte)
@@ -1108,9 +1131,8 @@ find_word(mip, mode)
/* When mode is FIND_PREFIX the word must support the prefix:
* check the prefix ID and the condition. Do that for the list at
* mip->mi_prefarridx that find_prefix() filled. */
- if (mode == FIND_PREFIX)
+ else if (mode == FIND_PREFIX)
{
- /* The prefix ID is stored two bytes above the flags. */
c = valid_word_prefix(mip->mi_prefcnt, mip->mi_prefarridx,
flags,
mip->mi_word + mip->mi_cprefixlen, slang,
@@ -1123,6 +1145,58 @@ find_word(mip, mode)
flags |= WF_RARE;
}
+ if (mode == FIND_COMPOUND || mode == FIND_KEEPCOMPOUND
+ || !word_ends)
+ {
+ /* Makes you wonder why someone puts a compound flag on a word
+ * that's too short... Myspell compatibility requires this
+ * anyway. */
+ if (wlen < slang->sl_compminlen)
+ continue;
+
+ /* The word doesn't end or it comes after another: it must
+ * have a compound flag. */
+ /* TODO: check more flags */
+ if (*slang->sl_compflags != ((unsigned)flags >> 24))
+ continue;
+ }
+
+ if (!word_ends)
+ {
+ /* Check that a valid word follows. If there is one, it will
+ * set "mi_result", thus we are always finished here.
+ * Recursive! */
+
+ /* Find following word in case-folded tree. */
+ mip->mi_compoff = endlen[endidxcnt];
+#ifdef FEAT_MBYTE
+ if (has_mbyte && mode == FIND_KEEPWORD)
+ {
+ /* Compute byte length in case-folded word from "wlen":
+ * byte length in keep-case word. Length may change when
+ * folding case. This can be slow, take a shortcut when
+ * the case-folded word is equal to the keep-case word. */
+ p = mip->mi_fword;
+ if (STRNCMP(ptr, p, wlen) != 0)
+ {
+ for (s = ptr; s < ptr + wlen; mb_ptr_adv(s))
+ mb_ptr_adv(p);
+ mip->mi_compoff = p - mip->mi_fword;
+ }
+ }
+#endif
+ find_word(mip, FIND_COMPOUND);
+ if (mip->mi_result == SP_OK)
+ break;
+
+ /* Find following word in keep-case tree. */
+ mip->mi_compoff = wlen;
+ find_word(mip, FIND_KEEPCOMPOUND);
+ if (mip->mi_result == SP_OK)
+ break;
+ continue;
+ }
+
if (flags & WF_BANNED)
res = SP_BANNED;
else if (flags & WF_REGION)
@@ -1758,6 +1832,9 @@ slang_clear(lp)
vim_free(lp->sl_midword);
lp->sl_midword = NULL;
+ vim_free(lp->sl_compflags);
+ lp->sl_compflags = NULL;
+
#ifdef FEAT_MBYTE
{
int todo = lp->sl_map_hash.ht_used;
@@ -1870,6 +1947,7 @@ spell_load_file(fname, lang, old_lp, silent)
* <charflagslen> <charflags>
* <fcharslen> <fchars>
* <midwordlen> <midword>
+ * <compoundlen> <compoundtype> <compoundinfo>
* <prefcondcnt> <prefcond> ...
*/
for (i = 0; i < VIMSPELLMAGICL; ++i)
@@ -1929,6 +2007,41 @@ formerr:
if (cnt < 0)
goto endFAIL;
+ /* <compoundlen> <compoundtype> <compoundinfo> */
+ cnt = (getc(fd) << 8) + getc(fd); /* <compoundlen> */
+ if (cnt < 0)
+ goto endFAIL;
+ if (cnt > 0)
+ {
+ --cnt;
+ c = getc(fd); /* <compoundtype> */
+ if (c != 1)
+ {
+ /* Unknown kind of compound words, skip the info. */
+ while (cnt-- > 0)
+ getc(fd);
+ }
+ else if (cnt < 2)
+ goto formerr;
+ else
+ {
+ --cnt;
+ c = getc(fd); /* <comp1minlen> */
+ if (c < 1 || c > 50)
+ c = 3;
+ lp->sl_compminlen = c;
+
+ p = alloc(cnt + 1);
+ if (p == NULL)
+ goto endFAIL;
+ lp->sl_compflags = p;
+ while (cnt-- > 0)
+ *p++ = getc(fd); /* <comp1flags> */
+ *p = NUL;
+ }
+ }
+
+
/* <prefcondcnt> <prefcond> ... */
cnt = (getc(fd) << 8) + getc(fd); /* <prefcondcnt> */
if (cnt > 0)
@@ -1943,7 +2056,7 @@ formerr:
{
/* <prefcond> : <condlen> <condstr> */
n = getc(fd); /* <condlen> */
- if (n < 0)
+ if (n < 0 || n >= MAXWLEN)
goto formerr;
/* When <condlen> is zero we have an empty condition. Otherwise
* compile the regexp program used to check for the condition. */
@@ -2518,7 +2631,7 @@ read_tree(fd, byts, idxs, maxidx, startidx, prefixtree, maxprefcondnr)
else
c = 0;
- c |= getc(fd); /* <prefixID> */
+ c |= getc(fd); /* <affixID> */
n = (getc(fd) << 8) + getc(fd); /* <prefcondnr> */
if (n >= maxprefcondnr)
@@ -2536,8 +2649,8 @@ read_tree(fd, byts, idxs, maxidx, startidx, prefixtree, maxprefcondnr)
c = (getc(fd) << 8) + c; /* <flags2> */
if (c & WF_REGION)
c = (getc(fd) << 16) + c; /* <region> */
- if (c & WF_PFX)
- c = (getc(fd) << 24) + c; /* <prefixID> */
+ if (c & WF_AFX)
+ c = (getc(fd) << 24) + c; /* <affixID> */
}
idxs[idx] = c;
@@ -3110,9 +3223,12 @@ spell_reload_one(fname, added_word)
typedef struct afffile_S
{
char_u *af_enc; /* "SET", normalized, alloc'ed string or NULL */
+ int af_slash; /* character used in word for slash */
int af_rar; /* RAR ID for rare word */
int af_kep; /* KEP ID for keep-case word */
int af_bad; /* BAD ID for banned word */
+ char_u *af_compflags; /* COMPOUNDFLAG or COMPOUNDFLAGS */
+ int af_compminlen; /* COMPOUNDMIN */
int af_pfxpostpone; /* postpone prefixes without chop string */
hashtab_T af_pref; /* hashtable for prefixes, affheader_T */
hashtab_T af_suff; /* hashtable for suffixes, affheader_T */
@@ -3187,7 +3303,7 @@ struct wordnode_S
siblings, in following siblings it is
always one. */
char_u wn_byte; /* Byte for this node. NUL for word end */
- char_u wn_prefixID; /* when "wn_byte" is NUL: supported/required
+ char_u wn_affixID; /* when "wn_byte" is NUL: supported/required
prefix ID or 0 */
short_u wn_flags; /* when "wn_byte" is NUL: WF_ flags */
short wn_region; /* when "wn_byte" is NUL: region mask; for
@@ -3245,6 +3361,8 @@ typedef struct spellinfo_S
int si_rem_accents; /* soundsalike: remove accents */
garray_T si_map; /* MAP info concatenated */
char_u *si_midword; /* MIDWORD chars, alloc'ed string or NULL */
+ int si_compminlen; /* minimal length for compounding */
+ char_u *si_compflags; /* flags used for compounding */
garray_T si_prefcond; /* table with conditions for postponed
* prefixes, each stored as a string */
int si_newID; /* current value for ah_newID */
@@ -3258,6 +3376,7 @@ static int has_non_ascii __ARGS((char_u *s));
static void spell_free_aff __ARGS((afffile_T *aff));
static int spell_read_dic __ARGS((spellinfo_T *spin, char_u *fname, afffile_T *affile));
static char_u *get_pfxlist __ARGS((spellinfo_T *spin, afffile_T *affile, char_u *afflist));
+static char_u *get_compflags __ARGS((spellinfo_T *spin, char_u *afflist));
static int store_aff_word __ARGS((spellinfo_T *spin, char_u *word, char_u *afflist, afffile_T *affile, hashtab_T *ht, hashtab_T *xht, int comb, int flags, char_u *pfxlist));
static int spell_read_wordfile __ARGS((spellinfo_T *spin, char_u *fname));
static void *getroom __ARGS((spellinfo_T *spin, size_t len, int align));
@@ -3265,7 +3384,7 @@ static char_u *getroom_save __ARGS((spellinfo_T *spin, char_u *s));
static void free_blocks __ARGS((sblock_T *bl));
static wordnode_T *wordtree_alloc __ARGS((spellinfo_T *spin));
static int store_word __ARGS((spellinfo_T *spin, char_u *word, int flags, int region, char_u *pfxlist));
-static int tree_add_word __ARGS((spellinfo_T *spin, char_u *word, wordnode_T *tree, int flags, int region, int prefixID));
+static int tree_add_word __ARGS((spellinfo_T *spin, char_u *word, wordnode_T *tree, int flags, int region, int affixID));
static wordnode_T *get_wordnode __ARGS((spellinfo_T *spin));
static void deref_wordnode __ARGS((spellinfo_T *spin, wordnode_T *node));
static void free_wordnode __ARGS((spellinfo_T *spin, wordnode_T *n));
@@ -3547,6 +3666,14 @@ spell_read_aff(spin, fname)
{
/* ignored, we look in the tree for what chars may appear */
}
+ else if (STRCMP(items[0], "SLASH") == 0 && itemcnt == 2
+ && aff->af_slash == 0)
+ {
+ aff->af_slash = items[1][0];
+ if (items[1][1] != NUL)
+ smsg((char_u *)_("Character used for SLASH must be ASCII; in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
else if (STRCMP(items[0], "RAR") == 0 && itemcnt == 2
&& aff->af_rar == 0)
{
@@ -3568,6 +3695,26 @@ spell_read_aff(spin, fname)
if (items[1][1] != NUL)
smsg((char_u *)_(e_affname), fname, lnum, items[1]);
}
+ else if (STRCMP(items[0], "COMPOUNDFLAG") == 0 && itemcnt == 2
+ && aff->af_compflags == 0)
+ {
+ aff->af_compflags = getroom_save(spin, items[1]);
+ if (items[1][1] != NUL)
+ smsg((char_u *)_(e_affname), fname, lnum, items[1]);
+ }
+ else if (STRCMP(items[0], "COMPOUNDFLAGS") == 0 && itemcnt == 2
+ && aff->af_compflags == 0)
+ {
+ aff->af_compflags = getroom_save(spin, items[1]);
+ }
+ else if (STRCMP(items[0], "COMPOUNDMIN") == 0 && itemcnt == 2
+ && aff->af_compminlen == 0)
+ {
+ aff->af_compminlen = atoi((char *)items[1]);
+ if (aff->af_compminlen == 0)
+ smsg((char_u *)_("Wrong COMPOUNDMIN value in %s line %d: %s"),
+ fname, lnum, items[1]);
+ }
else if (STRCMP(items[0], "PFXPOSTPONE") == 0 && itemcnt == 1)
{
aff->af_pfxpostpone = TRUE;
@@ -3688,7 +3835,10 @@ spell_read_aff(spin, fname)
else
sprintf((char *)buf, "%s$", items[4]);
aff_entry->ae_prog = vim_regcomp(buf,
- RE_MAGIC + RE_STRING);
+ RE_MAGIC + RE_STRING + RE_STRICT);
+ if (aff_entry->ae_prog == NULL)
+ smsg((char_u *)_("Broken condition in %s line %d: %s"),
+ fname, lnum, items[4]);
}
/* For postponed prefixes we need an entry in si_prefcond
@@ -3908,7 +4058,7 @@ spell_read_aff(spin, fname)
spin->si_sofoto = vim_strsave(items[1]);
}
else
- smsg((char_u *)_("Unrecognized item in %s line %d: %s"),
+ smsg((char_u *)_("Unrecognized or duplicate item in %s line %d: %s"),
fname, lnum, items[0]);
}
}
@@ -3952,6 +4102,28 @@ spell_read_aff(spin, fname)
vim_free(upp);
}
+ /* Use compound specifications of the .aff file for the spell info. */
+ if (aff->af_compminlen != 0)
+ {
+ if (spin->si_compminlen != 0
+ && spin->si_compminlen != aff->af_compminlen)
+ smsg((char_u *)_("COMPOUNDMIN value differs from what is used in another .aff file"));
+ else
+ spin->si_compminlen = aff->af_compminlen;
+ }
+
+ if (aff->af_compflags != NULL)
+ {
+ if (spin->si_compflags != NULL
+ && STRCMP(spin->si_compflags, aff->af_compflags) != 0)
+ smsg((char_u *)_("COMPOUNDFLAG(S) value differs from what is used in another .aff file"));
+ else
+ spin->si_compflags = aff->af_compflags;
+
+ if (aff->af_pfxpostpone)
+ smsg((char_u *)_("Cannot use both PFXPOSTPONE and COMPOUNDFLAG(S)"));
+ }
+
vim_free(pc);
fclose(fd);
return aff;
@@ -4072,8 +4244,9 @@ spell_read_dic(spin, fname, affile)
{
hashtab_T ht;
char_u line[MAXLINELEN];
+ char_u *p;
char_u *afflist;
- char_u *pfxlist;
+ char_u *store_afflist;
char_u *dw;
char_u *pc;
char_u *w;
@@ -4086,6 +4259,7 @@ spell_read_dic(spin, fname, affile)
int retval = OK;
char_u message[MAXLINELEN + MAXWLEN];
int flags;
+ int duplicate = 0;
/*
* Open the file.
@@ -4139,10 +4313,20 @@ spell_read_dic(spin, fname, affile)
continue; /* empty line */
line[l] = NUL;
- /* Find the optional affix names. */
- afflist = vim_strchr(line, '/');
- if (afflist != NULL)
- *afflist++ = NUL;
+ /* Find the optional affix names. Replace the SLASH character by a
+ * slash. */
+ afflist = NULL;
+ for (p = line; *p != NUL; mb_ptr_adv(p))
+ {
+ if (*p == affile->af_slash)
+ *p = '/';
+ else if (*p == '/')
+ {
+ *p = NUL;
+ afflist = p + 1;
+ break;
+ }
+ }
/* Skip non-ASCII words when "spin->si_ascii" is TRUE. */
if (spin->si_ascii && has_non_ascii(line))
@@ -4197,13 +4381,20 @@ spell_read_dic(spin, fname, affile)
hash = hash_hash(dw);
hi = hash_lookup(&ht, dw, hash);
if (!HASHITEM_EMPTY(hi))
- smsg((char_u *)_("Duplicate word in %s line %d: %s"),
+ {
+ if (p_verbose > 0)
+ smsg((char_u *)_("Duplicate word in %s line %d: %s"),
+ fname, lnum, dw);
+ else if (duplicate == 0)
+ smsg((char_u *)_("First duplicate word in %s line %d: %s"),
fname, lnum, dw);
+ ++duplicate;
+ }
else
hash_add_item(&ht, hi, dw, hash);
flags = 0;
- pfxlist = NULL;
+ store_afflist = NULL;
if (afflist != NULL)
{
/* Check for affix name that stands for keep-case word and stands
@@ -4220,11 +4411,15 @@ spell_read_dic(spin, fname, affile)
if (affile->af_pfxpostpone)
/* Need to store the list of prefix IDs with the word. */
- pfxlist = get_pfxlist(spin, affile, afflist);
+ store_afflist = get_pfxlist(spin, affile, afflist);
+ else if (spin->si_compflags)
+ /* Need to store the list of affix IDs for compounding with
+ * the word. */
+ store_afflist = get_compflags(spin, afflist);
}
/* Add the word to the word tree(s). */
- if (store_word(spin, dw, flags, spin->si_region, pfxlist) == FAIL)
+ if (store_word(spin, dw, flags, spin->si_region, store_afflist) == FAIL)
retval = FAIL;
if (afflist != NULL)
@@ -4233,20 +4428,22 @@ spell_read_dic(spin, fname, affile)
* Additionally do matching prefixes that combine. */
if (store_aff_word(spin, dw, afflist, affile,
&affile->af_suff, &affile->af_pref,
- FALSE, flags, pfxlist) == FAIL)
+ FALSE, flags, store_afflist) == FAIL)
retval = FAIL;
/* Find all matching prefixes and add the resulting words. */
if (store_aff_word(spin, dw, afflist, affile,
&affile->af_pref, NULL,
- FALSE, flags, pfxlist) == FAIL)
+ FALSE, flags, store_afflist) == FAIL)
retval = FAIL;
}
}
+ if (duplicate > 0)
+ smsg((char_u *)_("%d duplicate word(s) in %s"), duplicate, fname);
if (spin->si_ascii && non_ascii > 0)
- smsg((char_u *)_("Ignored %d words with non-ASCII characters"),
- non_ascii);
+ smsg((char_u *)_("Ignored %d word(s) with non-ASCII characters in %s"),
+ non_ascii, fname);
hash_clear(&ht);
fclose(fd);
@@ -4303,6 +4500,49 @@ get_pfxlist(spin, affile, afflist)
}
/*
+ * Get the list of affix IDs from the affix list "afflist" that are used for
+ * compound words.
+ * Returns a string allocated with getroom(). NULL when there are no relevant
+ * affixes or when out of memory.
+ */
+ static char_u *
+get_compflags(spin, afflist)
+ spellinfo_T *spin;
+ char_u *afflist;
+{
+ char_u *p;
+ int cnt;
+ int round;
+ char_u *res = NULL;
+
+ /* round 1: count the number of affix IDs.
+ * round 2: move affix IDs to "res" */
+ for (round = 1; round <= 2; ++round)
+ {
+ cnt = 0;
+ for (p = afflist; *p != NUL; ++p)
+ {
+ if (*p != ',' && *p != '-'
+ && vim_strchr(spin->si_compflags, *p) != NULL)
+ {
+ /* This is a compount affix ID. */
+ if (round == 2)
+ res[cnt] = *p;
+ ++cnt;
+ }
+ }
+ if (round == 1 && cnt > 0)
+ res = getroom(spin, cnt + 1, FALSE);
+ if (res == NULL)
+ break;
+ }
+
+ if (res != NULL)
+ res[cnt] = NUL;
+ return res;
+}
+
+/*
* Apply affixes to a word and store the resulting words.
* "ht" is the hashtable with affentry_T that need to be applied, either
* prefixes or suffixes.
@@ -4335,6 +4575,7 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags, pfxlist)
int use_flags;
char_u *use_pfxlist;
int c;
+ int wordlen = STRLEN(word);
todo = ht->ht_used;
for (hi = ht->ht_array; todo > 0 && retval == OK; ++hi)
@@ -4355,12 +4596,16 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags, pfxlist)
/* Check the condition. It's not logical to match case
* here, but it is required for compatibility with
* Myspell.
+ * Another requirement from Myspell is that the chop
+ * string is shorter than the word itself.
* For prefixes, when "PFXPOSTPONE" was used, only do
* prefixes with a chop string. */
regmatch.regprog = ae->ae_prog;
regmatch.rm_ic = FALSE;
if ((xht != NULL || !affile->af_pfxpostpone
|| ae->ae_chop != NULL)
+ && (ae->ae_chop == NULL
+ || STRLEN(ae->ae_chop) < wordlen)
&& (ae->ae_prog == NULL
|| vim_regexec(&regmatch, word, (colnr_T)0)))
{
@@ -4798,13 +5043,13 @@ store_word(spin, word, flags, region, pfxlist)
* Returns FAIL when out of memory.
*/
static int
-tree_add_word(spin, word, root, flags, region, prefixID)
+tree_add_word(spin, word, root, flags, region, affixID)
spellinfo_T *spin;
char_u *word;
wordnode_T *root;
int flags;
int region;
- int prefixID;
+ int affixID;
{
wordnode_T *node = root;
wordnode_T *np;
@@ -4836,7 +5081,7 @@ tree_add_word(spin, word, root, flags, region, prefixID)
{
np->wn_flags = copyp->wn_flags;
np->wn_region = copyp->wn_region;
- np->wn_prefixID = copyp->wn_prefixID;
+ np->wn_affixID = copyp->wn_affixID;
}
/* Link the new node in the list, there will be one ref. */
@@ -4853,15 +5098,15 @@ tree_add_word(spin, word, root, flags, region, prefixID)
/* Look for the sibling that has the same character. They are sorted
* on byte value, thus stop searching when a sibling is found with a
* higher byte value. For zero bytes (end of word) the sorting is
- * done on flags and then on prefixID. */
+ * done on flags and then on affixID. */
while (node != NULL
&& (node->wn_byte < word[i]
|| (node->wn_byte == NUL
&& (flags < 0
- ? node->wn_prefixID < prefixID
+ ? node->wn_affixID < affixID
: node->wn_flags < (flags & WN_MASK)
|| (node->wn_flags == (flags & WN_MASK)
- && node->wn_prefixID < prefixID)))))
+ && node->wn_affixID < affixID)))))
{
prev = &node->wn_sibling;
node = *prev;
@@ -4871,7 +5116,7 @@ tree_add_word(spin, word, root, flags, region, prefixID)
|| (word[i] == NUL
&& (flags < 0
|| node->wn_flags != (flags & WN_MASK)
- || node->wn_prefixID != prefixID)))
+ || node->wn_affixID != affixID)))
{
/* Allocate a new node. */
np = get_wordnode(spin);
@@ -4899,7 +5144,7 @@ tree_add_word(spin, word, root, flags, region, prefixID)
{
node->wn_flags = flags;
node->wn_region |= region;
- node->wn_prefixID = prefixID;
+ node->wn_affixID = affixID;
break;
}
prev = &node->wn_child;
@@ -5134,8 +5379,8 @@ node_compress(spin, node, ht, tot)
for (np = node; np != NULL; np = np->wn_sibling)
{
if (np->wn_byte == NUL)
- /* end node: use wn_flags, wn_region and wn_prefixID */
- n = np->wn_flags + (np->wn_region << 8) + (np->wn_prefixID << 16);
+ /* end node: use wn_flags, wn_region and wn_affixID */
+ n = np->wn_flags + (np->wn_region << 8) + (np->wn_affixID << 16);
else
/* byte node: use the byte value and the child pointer */
n = np->wn_byte + ((long_u)np->wn_child << 8);
@@ -5173,7 +5418,7 @@ node_equal(n1, n2)
|| (p1->wn_byte == NUL
? (p1->wn_flags != p2->wn_flags
|| p1->wn_region != p2->wn_region
- || p1->wn_prefixID != p2->wn_prefixID)
+ || p1->wn_affixID != p2->wn_affixID)
: (p1->wn_child != p2->wn_child)))
break;
@@ -5249,6 +5494,7 @@ write_vim_spell(spin, fname)
* <charflagslen> <charflags>
* <fcharslen> <fchars>
* <midwordlen> <midword>
+ * <compoundlen> <compoundtype> <compoundinfo>
* <prefcondcnt> <prefcond> ... */
/* <fileID> */
@@ -5297,6 +5543,20 @@ write_vim_spell(spin, fname)
}
+ /* Write the compound info. */
+ if (spin->si_compflags == NULL)
+ put_bytes(fd, 0L, 2); /* <compoundlen> */
+ else
+ {
+ l = STRLEN(spin->si_compflags);
+ put_bytes(fd, (long_u)(l + 2), 2); /* <compoundlen> */
+ putc(1, fd); /* <compoundtype> */
+ putc(spin->si_compminlen, fd); /* <comp1minlen> */
+ fwrite(spin->si_compflags, (size_t)l, (size_t)1, fd);
+ /* <comp1flags> */
+ }
+
+
/* Write the prefix conditions. */
write_spell_prefcond(fd, &spin->si_prefcond);
@@ -5472,7 +5732,7 @@ put_node(fd, node, index, regionmask, prefixtree)
/* For a NUL byte (end of word) write the flags etc. */
if (prefixtree)
{
- /* In PREFIXTREE write the required prefixID and the
+ /* In PREFIXTREE write the required affixID and the
* associated condition nr (stored in wn_region). The
* byte value is misused to store the "rare" and "not
* combining" flags */
@@ -5483,7 +5743,7 @@ put_node(fd, node, index, regionmask, prefixtree)
putc(BY_FLAGS, fd); /* <byte> */
putc(np->wn_flags, fd); /* <pflags> */
}
- putc(np->wn_prefixID, fd); /* <prefixID> */
+ putc(np->wn_affixID, fd); /* <affixID> */
put_bytes(fd, (long_u)np->wn_region, 2); /* <prefcondnr> */
}
else
@@ -5492,8 +5752,8 @@ put_node(fd, node, index, regionmask, prefixtree)
flags = np->wn_flags;
if (regionmask != 0 && np->wn_region != regionmask)
flags |= WF_REGION;
- if (np->wn_prefixID != 0)
- flags |= WF_PFX;
+ if (np->wn_affixID != 0)
+ flags |= WF_AFX;
if (flags == 0)
{
/* word without flags or region */
@@ -5514,8 +5774,8 @@ put_node(fd, node, index, regionmask, prefixtree)
}
if (flags & WF_REGION)
putc(np->wn_region, fd); /* <region> */
- if (flags & WF_PFX)
- putc(np->wn_prefixID, fd); /* <prefixID> */
+ if (flags & WF_AFX)
+ putc(np->wn_affixID, fd); /* <affixID> */
}
}
}
diff --git a/src/structs.h b/src/structs.h
index 4da686205..af859bf99 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -901,9 +901,8 @@ struct mapblock
int m_mode; /* valid mode */
int m_noremap; /* if non-zero no re-mapping for m_str */
char m_silent; /* <silent> used, don't echo commands */
-#if 0 /* Not used yet */
- scid_T m_script_ID; /* ID of script where map was defined,
- used for s: variables and functions */
+#ifdef FEAT_EVAL
+ scid_T m_script_ID; /* ID of script where map was defined */
#endif
};
diff --git a/src/undo.c b/src/undo.c
index 362b317e7..34e1f400d 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -404,6 +404,12 @@ u_savecommon(top, bot, newbot)
}
for (i = 0, lnum = top + 1; i < size; ++i)
{
+ fast_breakcheck();
+ if (got_int)
+ {
+ u_freeentry(uep, i);
+ return FAIL;
+ }
if ((uep->ue_array[i] = u_save_line(lnum++)) == NULL)
{
u_freeentry(uep, i);
diff --git a/src/version.h b/src/version.h
index d929fcc09..4b697355b 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 Aug 12)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 12, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 15)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Aug 15, compiled "
diff --git a/src/vim.h b/src/vim.h
index 812ef6f50..2760330d3 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -837,6 +837,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
/* Second argument for vim_regcomp(). */
#define RE_MAGIC 1 /* 'magic' option */
#define RE_STRING 2 /* match in string instead of buffer text */
+#define RE_STRICT 4 /* don't allow [abc] without ] */
#ifdef FEAT_SYN_HL
/* values for reg_do_extmatch */