• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revision74e9d19831c2357d7b998f484ebc609dbc08c5e4 (tree)
Time2005-06-07 06:59:07
Authorvimboss
Commitervimboss

Log Message

updated for version 7.0081

Change Summary

Incremental Difference

diff -r 7010607c5753 -r 74e9d19831c2 runtime/doc/options.txt
--- a/runtime/doc/options.txt Mon Jun 06 21:50:35 2005 +0000
+++ b/runtime/doc/options.txt Mon Jun 06 21:59:07 2005 +0000
@@ -1,4 +1,4 @@
1-*options.txt* For Vim version 7.0aa. Last change: 2005 May 31
1+*options.txt* For Vim version 7.0aa. Last change: 2005 Jun 06
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4294,7 +4294,6 @@
42944294 h all previous modes when editing a help file
42954295 a all previous modes
42964296 r for |hit-enter| and |more-prompt| prompt
4297- A auto-select in Visual mode
42984297 Normally you would enable the mouse in all four modes with: >
42994298 :set mouse=a
43004299 < When the mouse is not enabled, the GUI will still use the mouse for
diff -r 7010607c5753 -r 74e9d19831c2 runtime/doc/spell.txt
--- a/runtime/doc/spell.txt Mon Jun 06 21:50:35 2005 +0000
+++ b/runtime/doc/spell.txt Mon Jun 06 21:59:07 2005 +0000
@@ -1,4 +1,4 @@
1-*spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 04
1+*spell.txt* For Vim version 7.0aa. Last change: 2005 Jun 06
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -160,6 +160,9 @@
160160 into one en.spl file.
161161 Up to eight regions can be combined. *E754* *755*
162162
163+ When the spell file was written all currently used
164+ spell files will be reloaded.
165+
163166 Since you might want to change the word list for use with Vim the following
164167 procedure is recommended:
165168
@@ -205,10 +208,14 @@
205208 items are:
206209 - Empty and blank lines are ignored.
207210 - Lines starting with a # are ignored (comment lines).
208-- A line starting with "=encoding=" before any word. After the second '='
209- comes an encoding name. This tells Vim to setup conversion from the
210- specified encoding to 'encoding'.
211-- Other lines starting with '=' are special. The ones that are not recognized
211+- A line starting with "/encoding=", before any word, specifies the encoding
212+ of the file. After the second '=' comes an encoding name. This tells Vim
213+ to setup conversion from the specified encoding to 'encoding'.
214+- A line starting with "/?" specifies a word that should be marked as rare.
215+- A line starting with "/!" specifies a word that should be marked as bad.
216+- A line starting with "/=" specifies a word where case must match exactly.
217+ A "?" or "!" may be following: "/=?" and "/=!".
218+- Other lines starting with '/' are special. The ones that are not recognized
212219 are ignored (but you do get a warning message).
213220
214221
@@ -273,6 +280,9 @@
273280 ALS ALS als Als ALs AlS aLs aLS
274281 AlS AlS ALS als Als ALs aLs aLS
275282
283+The HUH affix ID can be used to specifically match a word in identical case
284+only, see below.
285+
276286 Note in line 5 to 7 that non-word characters are used. You can include
277287 any character in a word. When checking the text a word still only matches
278288 when it appears with a non-word character before and after it. For Myspell a
@@ -282,9 +292,10 @@
282292 letters that indicate the affixes that can be used with this word.
283293
284294 *spell-affix-vim*
285-A flag that Vim adds and is not in Myspell is the "=" flag. This has the
286-meaning that case matters. This can be used if the word does not have the
287-first letter in upper case at the start of a sentence. Example:
295+A flag that Vim adds and is not in Myspell is the flag defined with HUH in the
296+affix file. This has the meaning that case matters. This can be used if the
297+word does not have the first letter in upper case at the start of a sentence.
298+Example:
288299
289300 word list matches does not match ~
290301 's morgens/= 's morgens 'S morgens 's Morgens
@@ -311,9 +322,9 @@
311322 *E761* *E762*
312323 Three lines in the affix file are needed. Simplistic example:
313324
314- FOL áëñáëñ
315- LOW áëñáëñ
316- UPP áëñÁËÑ
325+ FOL áëñáëñ ~
326+ LOW áëñáëñ ~
327+ UPP áëñÁËÑ ~
317328
318329 All three lines must have exactly the same number of characters.
319330
@@ -338,4 +349,22 @@
338349 characters, so that it can be combine with spell files for any encoding.
339350
340351
352+In the affix file a HUH line can be used to define the affix name used for
353+keep-case words. Example:
354+
355+ HUH = ~
356+
357+See above for an example |spell-affix-vim|.
358+
359+
360+In the affix file a RAR line can be used to define the affix name used for
361+rare words. Example:
362+
363+ RAR ? ~
364+
365+Rare words are highlighted differently from bad words. This is to be used for
366+words that are correct for the language, but are hardly ever used and could be
367+a typing mistake anyway.
368+
369+
341370 vim:tw=78:sw=4:ts=8:ft=help:norl:
diff -r 7010607c5753 -r 74e9d19831c2 runtime/doc/term.txt
--- a/runtime/doc/term.txt Mon Jun 06 21:50:35 2005 +0000
+++ b/runtime/doc/term.txt Mon Jun 06 21:59:07 2005 +0000
@@ -1,4 +1,4 @@
1-*term.txt* For Vim version 7.0aa. Last change: 2005 Mar 14
1+*term.txt* For Vim version 7.0aa. Last change: 2005 Jun 06
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -594,7 +594,6 @@
594594 h all previous modes when in a help file
595595 a all previous modes
596596 r for |hit-enter| prompt
597- A auto-select in Visual mode
598597
599598 The default for 'mouse' is empty, the mouse is not used. Normally you would
600599 do: >
diff -r 7010607c5753 -r 74e9d19831c2 runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Mon Jun 06 21:50:35 2005 +0000
+++ b/runtime/doc/todo.txt Mon Jun 06 21:59:07 2005 +0000
@@ -1,4 +1,4 @@
1-*todo.txt* For Vim version 7.0aa. Last change: 2005 Jun 05
1+*todo.txt* For Vim version 7.0aa. Last change: 2005 Jun 06
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -99,12 +99,16 @@
9999 Use array with flags, indicating if there is a word starting with this
100100 byte. Quickly skip bytes where no word can start.
101101 - Spell checking code todo's:
102- - Implement user and project word lists. Commands to add words and to
103- mark words as wrong.
104102 - Also allow replacing a word list. Need some mechanism to tell
105103 wether a spell file adds or replaces one found later in
106104 'runtimepath'.
107- - Implement = flag in .dic: KEEPCASE for lower case word.
105+ - Is "-" to be considered a word character? "last-minute".
106+ No, in Dutch it can be added optionally. Then make English
107+ dictionaries consistent.
108+ - Implement user and project word lists. Commands to add words and to
109+ mark words as wrong.
110+ - In .aff use RAR to define affix name for rare word.
111+ - In .aff use HUH to define affix name for keep-case word.
108112 's morgens/= does not match 'S morgens
109113 - Implement compound words?
110114 - When @Spell and @NoSpell are both used only do spell checking for
@@ -413,8 +417,6 @@
413417
414418
415419 Vi incompatibility:
416-9 In Ex mode, "u" undoes all changes, not just the last one. (John Cowan)
417-8 In Ex mode, an empty file doesn't have a first line, "1p" should fail.
418420 8 With undo/redo only marks in the changed lines should be changed. Other
419421 marks should be kept. Vi keeps each mark at the same text, even when it
420422 is deleted or restored. (Webb)
diff -r 7010607c5753 -r 74e9d19831c2 runtime/doc/version7.txt
--- a/runtime/doc/version7.txt Mon Jun 06 21:50:35 2005 +0000
+++ b/runtime/doc/version7.txt Mon Jun 06 21:59:07 2005 +0000
@@ -1,4 +1,4 @@
1-*version7.txt* For Vim version 7.0aa. Last change: 2005 Jun 05
1+*version7.txt* For Vim version 7.0aa. Last change: 2005 Jun 06
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -255,7 +255,8 @@
255255 - Autoindent for ":change" is using the first changed line.
256256 - Editing Ex command lines is not done in cooked mode, because CTRL-D and
257257 CTRL-T cannot be handled then.
258-- In Ex mode, "1,3" prints three lines.
258+- In Ex mode, "1,3" prints three lines. "%" prints all lines.
259+- In Ex mode "undo" would undo all changes since Ex mode was started.
259260 - Implemented the 'prompt' option.
260261
261262
diff -r 7010607c5753 -r 74e9d19831c2 runtime/spell/en.ascii.spl
Binary file runtime/spell/en.ascii.spl has changed
diff -r 7010607c5753 -r 74e9d19831c2 runtime/spell/en.latin1.spl
Binary file runtime/spell/en.latin1.spl has changed
diff -r 7010607c5753 -r 74e9d19831c2 runtime/syntax/logtalk.vim
--- a/runtime/syntax/logtalk.vim Mon Jun 06 21:50:35 2005 +0000
+++ b/runtime/syntax/logtalk.vim Mon Jun 06 21:59:07 2005 +0000
@@ -2,7 +2,7 @@
22 "
33 " Language: Logtalk
44 " Maintainer: Paulo Moura <pmoura@logtalk.org>
5-" Last Change: May 30, 2005
5+" Last Change: June 6, 2005
66
77
88 " Quit when a syntax file was already loaded:
@@ -48,23 +48,25 @@
4848
4949 " Logtalk opening entity directives
5050
51-syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- object(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=ALL
52-syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- protocol(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=ALL
53-syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- category(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=ALL
51+syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- object(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel
52+syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- protocol(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel
53+syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- category(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator,logtalkEntityRel
5454
5555
5656 " Logtalk closing entity directives
5757
58-syn match logtalkCloseEntityDir ":- end_\(object\|protocol\|category\)\."
58+syn match logtalkCloseEntityDir ":- end_object\."
59+syn match logtalkCloseEntityDir ":- end_protocol\."
60+syn match logtalkCloseEntityDir ":- end_category\."
5961
6062
6163 " Logtalk entity relations
6264
63-syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="instantiates(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained
64-syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="specializes(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained
65-syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="extends(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained
66-syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="imports(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained
67-syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="implements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained
65+syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="instantiates(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained
66+syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="specializes(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained
67+syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="extends(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained
68+syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="imports(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained
69+syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="implements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity,logtalkVariable,logtalkNumber,logtalkOperator contained
6870
6971
7072 " Logtalk directives
@@ -297,9 +299,9 @@
297299 syn match logtalkNumber "\<\d\+\.\d\+\>"
298300 syn match logtalkNumber "\<\d\+[eE][-+]\=\d\+\>"
299301 syn match logtalkNumber "\<\d\+\.\d\+[eE][-+]\=\d\+\>"
300-syn match logtalkNumber "\<0'[0-9a-zA-Z]\>"
302+syn match logtalkNumber "\<0'.\>"
301303 syn match logtalkNumber "\<0b[0-1]\+\>"
302-syn match logtalkNumber "\<0o[0-7]\+\>"
304+syn match logtalkNumber "\<0o\o\+\>"
303305 syn match logtalkNumber "\<0x\x\+\>"
304306
305307
@@ -310,10 +312,17 @@
310312
311313 " Logtalk comments
312314
313-syn region logtalkBlockComment start="/\*" end="\*/"
315+syn region logtalkBlockComment start="/\*" end="\*/" fold
314316 syn match logtalkLineComment "%.*"
315317
316318
319+" Logtalk entity folding
320+
321+syn region logtalkEntity transparent fold keepend start=":- object(" end=":- end_object\." contains=ALL
322+syn region logtalkEntity transparent fold keepend start=":- protocol(" end=":- end_protocol\." contains=ALL
323+syn region logtalkEntity transparent fold keepend start=":- category(" end=":- end_category\." contains=ALL
324+
325+
317326 syn sync ccomment logtalkBlockComment maxlines=50
318327
319328
@@ -370,3 +379,5 @@
370379 let b:current_syntax = "logtalk"
371380
372381 setlocal ts=4
382+setlocal fdm=syntax
383+setlocal fdc=2
diff -r 7010607c5753 -r 74e9d19831c2 src/charset.c
--- a/src/charset.c Mon Jun 06 21:50:35 2005 +0000
+++ b/src/charset.c Mon Jun 06 21:59:07 2005 +0000
@@ -914,382 +914,6 @@
914914 # endif
915915 return (GET_CHARTAB(buf, *p) != 0);
916916 }
917-
918-/*
919- * The tables used for spelling. These are only used for the first 256
920- * characters.
921- */
922-typedef struct spelltab_S
923-{
924- char_u st_isw[256]; /* flags: is word char */
925- char_u st_isu[256]; /* flags: is uppercase char */
926- char_u st_fold[256]; /* chars: folded case */
927-} spelltab_T;
928-
929-static spelltab_T spelltab;
930-static int did_set_spelltab;
931-
932-#define SPELL_ISWORD 1
933-#define SPELL_ISUPPER 2
934-
935-static void clear_spell_chartab __ARGS((spelltab_T *sp));
936-static int set_spell_finish __ARGS((spelltab_T *new_st));
937-
938-/*
939- * Init the chartab used for spelling for ASCII.
940- * EBCDIC is not supported!
941- */
942- static void
943-clear_spell_chartab(sp)
944- spelltab_T *sp;
945-{
946- int i;
947-
948- /* Init everything to FALSE. */
949- vim_memset(sp->st_isw, FALSE, sizeof(sp->st_isw));
950- vim_memset(sp->st_isu, FALSE, sizeof(sp->st_isu));
951- for (i = 0; i < 256; ++i)
952- sp->st_fold[i] = i;
953-
954- /* We include digits. A word shouldn't start with a digit, but handling
955- * that is done separately. */
956- for (i = '0'; i <= '9'; ++i)
957- sp->st_isw[i] = TRUE;
958- for (i = 'A'; i <= 'Z'; ++i)
959- {
960- sp->st_isw[i] = TRUE;
961- sp->st_isu[i] = TRUE;
962- sp->st_fold[i] = i + 0x20;
963- }
964- for (i = 'a'; i <= 'z'; ++i)
965- sp->st_isw[i] = TRUE;
966-}
967-
968-/*
969- * Init the chartab used for spelling. Only depends on 'encoding'.
970- * Called once while starting up and when 'encoding' changes.
971- * The default is to use isalpha(), but the spell file should define the word
972- * characters to make it possible that 'encoding' differs from the current
973- * locale.
974- */
975- void
976-init_spell_chartab()
977-{
978- int i;
979-
980- did_set_spelltab = FALSE;
981- clear_spell_chartab(&spelltab);
982-
983-#ifdef FEAT_MBYTE
984- if (enc_dbcs)
985- {
986- /* DBCS: assume double-wide characters are word characters. */
987- for (i = 128; i <= 255; ++i)
988- if (MB_BYTE2LEN(i) == 2)
989- spelltab.st_isw[i] = TRUE;
990- }
991- else
992-#endif
993- {
994- /* Rough guess: use isalpha() and isupper() for characters above 128.
995- * */
996- for (i = 128; i < 256; ++i)
997- {
998- spelltab.st_isw[i] = MB_ISUPPER(i) || MB_ISLOWER(i);
999- if (MB_ISUPPER(i))
1000- {
1001- spelltab.st_isu[i] = TRUE;
1002- spelltab.st_fold[i] = MB_TOLOWER(i);
1003- }
1004- }
1005- }
1006-}
1007-
1008-#if defined(FEAT_MBYTE) || defined(PROTO)
1009-static char *e_affform = N_("E761: Format error in affix file FOL, LOW or UPP");
1010-static char *e_affrange = N_("E762: Character in FOL, LOW or UPP is out of range");
1011-
1012-/*
1013- * Set the spell character tables from strings in the affix file.
1014- */
1015- int
1016-set_spell_chartab(fol, low, upp)
1017- char_u *fol;
1018- char_u *low;
1019- char_u *upp;
1020-{
1021- /* We build the new tables here first, so that we can compare with the
1022- * previous one. */
1023- spelltab_T new_st;
1024- char_u *pf = fol, *pl = low, *pu = upp;
1025- int f, l, u;
1026-
1027- clear_spell_chartab(&new_st);
1028-
1029- while (*pf != NUL)
1030- {
1031- if (*pl == NUL || *pu == NUL)
1032- {
1033- EMSG(_(e_affform));
1034- return FAIL;
1035- }
1036-#ifdef FEAT_MBYTE
1037- f = mb_ptr2char_adv(&pf);
1038- l = mb_ptr2char_adv(&pl);
1039- u = mb_ptr2char_adv(&pu);
1040-#else
1041- f = *pf++;
1042- l = *pl++;
1043- u = *pu++;
1044-#endif
1045- /* Every character that appears is a word character. */
1046- if (f < 256)
1047- new_st.st_isw[f] = TRUE;
1048- if (l < 256)
1049- new_st.st_isw[l] = TRUE;
1050- if (u < 256)
1051- new_st.st_isw[u] = TRUE;
1052-
1053- /* if "LOW" and "FOL" are not the same the "LOW" char needs
1054- * case-folding */
1055- if (l < 256 && l != f)
1056- {
1057- if (f >= 256)
1058- {
1059- EMSG(_(e_affrange));
1060- return FAIL;
1061- }
1062- new_st.st_fold[l] = f;
1063- }
1064-
1065- /* if "UPP" and "FOL" are not the same the "UPP" char needs
1066- * case-folding and it's upper case. */
1067- if (u < 256 && u != f)
1068- {
1069- if (f >= 256)
1070- {
1071- EMSG(_(e_affrange));
1072- return FAIL;
1073- }
1074- new_st.st_fold[u] = f;
1075- new_st.st_isu[u] = TRUE;
1076- }
1077- }
1078-
1079- if (*pl != NUL || *pu != NUL)
1080- {
1081- EMSG(_(e_affform));
1082- return FAIL;
1083- }
1084-
1085- return set_spell_finish(&new_st);
1086-}
1087-#endif
1088-
1089-/*
1090- * Set the spell character tables from strings in the .spl file.
1091- */
1092- int
1093-set_spell_charflags(flags, cnt, upp)
1094- char_u *flags;
1095- int cnt;
1096- char_u *upp;
1097-{
1098- /* We build the new tables here first, so that we can compare with the
1099- * previous one. */
1100- spelltab_T new_st;
1101- int i;
1102- char_u *p = upp;
1103-
1104- clear_spell_chartab(&new_st);
1105-
1106- for (i = 0; i < cnt; ++i)
1107- {
1108- new_st.st_isw[i + 128] = (flags[i] & SPELL_ISWORD) != 0;
1109- new_st.st_isu[i + 128] = (flags[i] & SPELL_ISUPPER) != 0;
1110-
1111- if (*p == NUL)
1112- return FAIL;
1113-#ifdef FEAT_MBYTE
1114- new_st.st_fold[i + 128] = mb_ptr2char_adv(&p);
1115-#else
1116- new_st.st_fold[i + 128] = *p++;
1117-#endif
1118- }
1119-
1120- return set_spell_finish(&new_st);
1121-}
1122-
1123- static int
1124-set_spell_finish(new_st)
1125- spelltab_T *new_st;
1126-{
1127- int i;
1128-
1129- if (did_set_spelltab)
1130- {
1131- /* check that it's the same table */
1132- for (i = 0; i < 256; ++i)
1133- {
1134- if (spelltab.st_isw[i] != new_st->st_isw[i]
1135- || spelltab.st_isu[i] != new_st->st_isu[i]
1136- || spelltab.st_fold[i] != new_st->st_fold[i])
1137- {
1138- EMSG(_("E763: Word characters differ between spell files"));
1139- return FAIL;
1140- }
1141- }
1142- }
1143- else
1144- {
1145- /* copy the new spelltab into the one being used */
1146- spelltab = *new_st;
1147- did_set_spelltab = TRUE;
1148- }
1149-
1150- return OK;
1151-}
1152-
1153-#if defined(FEAT_MBYTE) || defined(PROTO)
1154-/*
1155- * Write the current tables into the .spl file.
1156- * This makes sure the same characters are recognized as word characters when
1157- * generating an when using a spell file.
1158- */
1159- void
1160-write_spell_chartab(fd)
1161- FILE *fd;
1162-{
1163- char_u charbuf[256 * 4];
1164- int len = 0;
1165- int flags;
1166- int i;
1167-
1168- fputc(128, fd); /* <charflagslen> */
1169- for (i = 128; i < 256; ++i)
1170- {
1171- flags = 0;
1172- if (spelltab.st_isw[i])
1173- flags |= SPELL_ISWORD;
1174- if (spelltab.st_isu[i])
1175- flags |= SPELL_ISUPPER;
1176- fputc(flags, fd); /* <charflags> */
1177-
1178- len += mb_char2bytes(spelltab.st_fold[i], charbuf + len);
1179- }
1180-
1181- put_bytes(fd, (long_u)len, 2); /* <fcharlen> */
1182- fwrite(charbuf, (size_t)len, (size_t)1, fd); /* <fchars> */
1183-}
1184-#endif
1185-
1186-/*
1187- * Return TRUE if "p" points to a word character for spelling.
1188- */
1189- int
1190-spell_iswordc(p)
1191- char_u *p;
1192-{
1193-# ifdef FEAT_MBYTE
1194- if (has_mbyte && MB_BYTE2LEN(*p) > 1)
1195- return mb_get_class(p) >= 2;
1196-# endif
1197- return spelltab.st_isw[*p];
1198-}
1199-
1200-/*
1201- * Return TRUE if "c" is an upper-case character for spelling.
1202- */
1203- int
1204-spell_isupper(c)
1205- int c;
1206-{
1207-# ifdef FEAT_MBYTE
1208- if (enc_utf8)
1209- {
1210- /* For Unicode we can call utf_isupper(), but don't do that for ASCII,
1211- * because we don't want to use 'casemap' here. */
1212- if (c >= 128)
1213- return utf_isupper(c);
1214- }
1215- else if (has_mbyte && c > 256)
1216- {
1217- /* For characters above 255 we don't have something specfied.
1218- * Fall back to locale-dependent iswupper(). If not available
1219- * simply return FALSE. */
1220-# ifdef HAVE_ISWUPPER
1221- return iswupper(c);
1222-# else
1223- return FALSE;
1224-# endif
1225- }
1226-# endif
1227- return spelltab.st_isu[c];
1228-}
1229-
1230-/*
1231- * case-fold "p[len]" into "buf[buflen]". Used for spell checking.
1232- * Returns FAIL when something wrong.
1233- */
1234- int
1235-spell_casefold(p, len, buf, buflen)
1236- char_u *p;
1237- int len;
1238- char_u *buf;
1239- int buflen;
1240-{
1241- int i;
1242-
1243- if (len >= buflen)
1244- {
1245- buf[0] = NUL;
1246- return FAIL; /* result will not fit */
1247- }
1248-
1249-#ifdef FEAT_MBYTE
1250- if (has_mbyte)
1251- {
1252- int c;
1253- int outi = 0;
1254-
1255- /* Fold one character at a time. */
1256- for (i = 0; i < len; i += mb_ptr2len_check(p + i))
1257- {
1258- c = mb_ptr2char(p + i);
1259- if (enc_utf8)
1260- /* For Unicode case folding is always the same, no need to use
1261- * the table from the spell file. */
1262- c = utf_fold(c);
1263- else if (c < 256)
1264- /* Use the table from the spell file. */
1265- c = spelltab.st_fold[c];
1266-# ifdef HAVE_TOWLOWER
1267- else
1268- /* We don't know what to do, fall back to towlower(), it
1269- * depends on the current locale. */
1270- c = towlower(c);
1271-# endif
1272- if (outi + MB_MAXBYTES > buflen)
1273- {
1274- buf[outi] = NUL;
1275- return FAIL;
1276- }
1277- outi += mb_char2bytes(c, buf + outi);
1278- }
1279- buf[outi] = NUL;
1280- }
1281- else
1282-#endif
1283- {
1284- /* Be quick for non-multibyte encodings. */
1285- for (i = 0; i < len; ++i)
1286- buf[i] = spelltab.st_fold[p[i]];
1287- buf[i] = NUL;
1288- }
1289-
1290- return OK;
1291-}
1292-
1293917 #endif /* FEAT_SYN_HL */
1294918
1295919 /*
diff -r 7010607c5753 -r 74e9d19831c2 src/gui_mac.c
--- a/src/gui_mac.c Mon Jun 06 21:50:35 2005 +0000
+++ b/src/gui_mac.c Mon Jun 06 21:59:07 2005 +0000
@@ -4185,6 +4185,7 @@
41854185 {"brown", RGB(0x80, 0x40, 0x40)}, /*W*/
41864186 {"yellow", RGB(0xFC, 0xF3, 0x05)}, /*M*/
41874187 {"lightyellow", RGB(0xFF, 0xFF, 0xA0)}, /*M*/
4188+ {"darkyellow", RGB(0xBB, 0xBB, 0x00)}, /*U*/
41884189 {"SeaGreen", RGB(0x2E, 0x8B, 0x57)}, /*W 0x4E8975 */
41894190 {"orange", RGB(0xFC, 0x80, 0x00)}, /*W 0xF87A17 */
41904191 {"Purple", RGB(0xA0, 0x20, 0xF0)}, /*W 0x8e35e5 */
diff -r 7010607c5753 -r 74e9d19831c2 src/mbyte.c
--- a/src/mbyte.c Mon Jun 06 21:50:35 2005 +0000
+++ b/src/mbyte.c Mon Jun 06 21:59:07 2005 +0000
@@ -2192,6 +2192,7 @@
21922192 {
21932193 int i, j, l;
21942194 int cdiff;
2195+ int incomplete = FALSE;
21952196 int n = nn;
21962197
21972198 for (i = 0; i < n; i += l)
@@ -2202,7 +2203,10 @@
22022203 {
22032204 l = utf_byte2len(s1[i]);
22042205 if (l > n - i)
2206+ {
22052207 l = n - i; /* incomplete character */
2208+ incomplete = TRUE;
2209+ }
22062210 /* Check directly first, it's faster. */
22072211 for (j = 0; j < l; ++j)
22082212 if (s1[i + j] != s2[i + j])
@@ -2210,7 +2214,7 @@
22102214 if (j < l)
22112215 {
22122216 /* If one of the two characters is incomplete return -1. */
2213- if (i + utf_byte2len(s1[i]) > n || i + utf_byte2len(s2[i]) > n)
2217+ if (incomplete || i + utf_byte2len(s2[i]) > n)
22142218 return -1;
22152219 cdiff = utf_fold(utf_ptr2char(s1 + i))
22162220 - utf_fold(utf_ptr2char(s2 + i));
diff -r 7010607c5753 -r 74e9d19831c2 src/proto/spell.pro
--- a/src/proto/spell.pro Mon Jun 06 21:50:35 2005 +0000
+++ b/src/proto/spell.pro Mon Jun 06 21:59:07 2005 +0000
@@ -5,4 +5,5 @@
55 void spell_reload __ARGS((void));
66 void put_bytes __ARGS((FILE *fd, long_u nr, int len));
77 void ex_mkspell __ARGS((exarg_T *eap));
8+void init_spell_chartab __ARGS((void));
89 /* vim: set ft=c : */
diff -r 7010607c5753 -r 74e9d19831c2 src/regexp.c
--- a/src/regexp.c Mon Jun 06 21:50:35 2005 +0000
+++ b/src/regexp.c Mon Jun 06 21:59:07 2005 +0000
@@ -322,9 +322,9 @@
322322
323323 /* Used for an error (down from) vim_regcomp(): give the error message, set
324324 * rc_did_emsg and return NULL */
325-#define EMSG_RET_NULL(m) { EMSG(m); rc_did_emsg = TRUE; return NULL; }
326-#define EMSG_M_RET_NULL(m, c) { EMSG2(m, c ? "" : "\\"); rc_did_emsg = TRUE; return NULL; }
327-#define EMSG_RET_FAIL(m) { EMSG(m); rc_did_emsg = TRUE; return FAIL; }
325+#define EMSG_RET_NULL(m) return (EMSG(m), rc_did_emsg = TRUE, NULL)
326+#define EMSG_M_RET_NULL(m, c) return (EMSG2((m), (c) ? "" : "\\"), rc_did_emsg = TRUE, NULL)
327+#define EMSG_RET_FAIL(m) return (EMSG(m), rc_did_emsg = TRUE, FAIL)
328328 #define EMSG_ONE_RET_NULL EMSG_M_RET_NULL(_("E369: invalid item in %s%%[]"), reg_magic == MAGIC_ALL)
329329
330330 #define MAX_LIMIT (32767L << 16L)
@@ -1246,20 +1246,20 @@
12461246 {
12471247 #ifdef FEAT_SYN_HL
12481248 if (paren == REG_ZPAREN)
1249- EMSG_RET_NULL(_("E52: Unmatched \\z("))
1249+ EMSG_RET_NULL(_("E52: Unmatched \\z("));
12501250 else
12511251 #endif
12521252 if (paren == REG_NPAREN)
1253- EMSG_M_RET_NULL(_("E53: Unmatched %s%%("), reg_magic == MAGIC_ALL)
1253+ EMSG_M_RET_NULL(_("E53: Unmatched %s%%("), reg_magic == MAGIC_ALL);
12541254 else
1255- EMSG_M_RET_NULL(_("E54: Unmatched %s("), reg_magic == MAGIC_ALL)
1255+ EMSG_M_RET_NULL(_("E54: Unmatched %s("), reg_magic == MAGIC_ALL);
12561256 }
12571257 else if (paren == REG_NOPAREN && peekchr() != NUL)
12581258 {
12591259 if (curchr == Magic(')'))
1260- EMSG_M_RET_NULL(_("E55: Unmatched %s)"), reg_magic == MAGIC_ALL)
1260+ EMSG_M_RET_NULL(_("E55: Unmatched %s)"), reg_magic == MAGIC_ALL);
12611261 else
1262- EMSG_RET_NULL(_(e_trailing)) /* "Can't happen". */
1262+ EMSG_RET_NULL(_(e_trailing)); /* "Can't happen". */
12631263 /* NOTREACHED */
12641264 }
12651265 /*
@@ -2985,7 +2985,6 @@
29852985 char_u *ptr;
29862986 lpos_T pos;
29872987 } se_u;
2988- int se_len;
29892988 } save_se_T;
29902989
29912990 static char_u *reg_getline __ARGS((linenr_T lnum));
diff -r 7010607c5753 -r 74e9d19831c2 src/syntax.c
--- a/src/syntax.c Mon Jun 06 21:50:35 2005 +0000
+++ b/src/syntax.c Mon Jun 06 21:59:07 2005 +0000
@@ -6028,7 +6028,7 @@
60286028 "Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue",
60296029 "FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
60306030 "SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue",
6031- "Visual term=reverse ctermbg=Grey guibg=Grey",
6031+ "Visual term=reverse ctermbg=LightGrey guibg=LightGrey",
60326032 "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue",
60336033 "DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta",
60346034 "DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan",
@@ -6053,7 +6053,7 @@
60536053 "Folded term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=DarkGrey guifg=Cyan",
60546054 "FoldColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
60556055 "SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan",
6056- "Visual term=reverse ctermbg=Grey guibg=Grey",
6056+ "Visual term=reverse ctermbg=DarkGrey guibg=DarkGrey",
60576057 "DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue",
60586058 "DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta",
60596059 "DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan",
diff -r 7010607c5753 -r 74e9d19831c2 src/version.h
--- a/src/version.h Mon Jun 06 21:50:35 2005 +0000
+++ b/src/version.h Mon Jun 06 21:59:07 2005 +0000
@@ -36,5 +36,5 @@
3636 #define VIM_VERSION_NODOT "vim70aa"
3737 #define VIM_VERSION_SHORT "7.0aa"
3838 #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
39-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 5)"
40-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 5, compiled "
39+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 6)"
40+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Jun 6, compiled "
Show on old repository browser