• R/O
  • SSH

vim: 提交

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


Commit MetaInfo

修訂8173ec1e9f1f746657dd598b6e876b11c99e1049 (tree)
時間2005-01-09 01:11:57
作者vimboss
Commitervimboss

Log Message

updated for version 7.0034

Change Summary

差異

diff -r fc244e0a6e7e -r 8173ec1e9f1f runtime/doc/quickfix.txt
--- a/runtime/doc/quickfix.txt Sat Jan 08 16:08:21 2005 +0000
+++ b/runtime/doc/quickfix.txt Sat Jan 08 16:11:57 2005 +0000
@@ -1,4 +1,4 @@
1-*quickfix.txt* For Vim version 7.0aa. Last change: 2004 Dec 28
1+*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Jan 08
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -292,7 +292,7 @@
292292
293293 5.1 using Vim's internal grep
294294
295- *:vim* *:vimgrep*
295+ *:vim* *:vimgrep* *E682* *E683*
296296 :vim[grep][!] /{pattern}/ {file} ...
297297 Search for {pattern} in the files {file} ... and set
298298 the error list to the matches.
diff -r fc244e0a6e7e -r 8173ec1e9f1f runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Sat Jan 08 16:08:21 2005 +0000
+++ b/runtime/doc/todo.txt Sat Jan 08 16:11:57 2005 +0000
@@ -1,4 +1,4 @@
1-*todo.txt* For Vim version 7.0aa. Last change: 2005 Jan 07
1+*todo.txt* For Vim version 7.0aa. Last change: 2005 Jan 08
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,9 +30,7 @@
3030 *known-bugs*
3131 -------------------- Known bugs and current work -----------------------
3232
33-List data type:
34-- Write docs for using Lists.
35-- Fix the error numbers E999 in eval.c.
33+Add mouse patch from Marcin Dalecki.
3634
3735 Use 'ignorecase' for ":vimgrep"?
3836
diff -r fc244e0a6e7e -r 8173ec1e9f1f src/eval.c
--- a/src/eval.c Sat Jan 08 16:08:21 2005 +0000
+++ b/src/eval.c Sat Jan 08 16:11:57 2005 +0000
@@ -105,11 +105,11 @@
105105
106106 #define VAR_LIST_MAXNEST 100 /* maximum nesting of lists */
107107 static char *e_letunexp = N_("E18: Unexpected characters in :let");
108-static char *e_listidx = N_("E999: list index out of range: %ld");
108+static char *e_listidx = N_("E684: list index out of range: %ld");
109109 static char *e_undefvar = N_("E121: Undefined variable: %s");
110110 static char *e_missbrac = N_("E111: Missing ']'");
111-static char *e_intern2 = N_("E999: Internal error: %s");
112-static char *e_listarg = N_("E999: Argument of %s must be a list");
111+static char *e_intern2 = N_("E685: Internal error: %s");
112+static char *e_listarg = N_("E686: Argument of %s must be a list");
113113
114114 /*
115115 * All user-defined global variables are stored in "variables".
@@ -369,6 +369,7 @@
369369 static void f_did_filetype __ARGS((typeval *argvars, typeval *rettv));
370370 static void f_diff_filler __ARGS((typeval *argvars, typeval *rettv));
371371 static void f_diff_hlID __ARGS((typeval *argvars, typeval *rettv));
372+static void f_empty __ARGS((typeval *argvars, typeval *rettv));
372373 static void f_escape __ARGS((typeval *argvars, typeval *rettv));
373374 static void f_eventhandler __ARGS((typeval *argvars, typeval *rettv));
374375 static void f_executable __ARGS((typeval *argvars, typeval *rettv));
@@ -1141,12 +1142,12 @@
11411142 i = list_len(l);
11421143 if (semicolon == 0 && var_count < i)
11431144 {
1144- EMSG(_("E999: Less targets than List items"));
1145+ EMSG(_("E687: Less targets than List items"));
11451146 return FAIL;
11461147 }
11471148 if (var_count - semicolon > i)
11481149 {
1149- EMSG(_("E999: More targets than List items"));
1150+ EMSG(_("E688: More targets than List items"));
11501151 return FAIL;
11511152 }
11521153
@@ -1574,7 +1575,7 @@
15741575 {
15751576 if (tv->v_type != VAR_LIST || tv->vval.v_list == NULL)
15761577 {
1577- EMSG(_("E999: Can only index a List"));
1578+ EMSG(_("E689: Can only index a List"));
15781579 p = NULL;
15791580 break;
15801581 }
@@ -1707,7 +1708,7 @@
17071708 expr = skipwhite(expr);
17081709 if (expr[0] != 'i' || expr[1] != 'n' || !vim_iswhite(expr[2]))
17091710 {
1710- EMSG(_("E999: Missing \"in\" after :for"));
1711+ EMSG(_("E690: Missing \"in\" after :for"));
17111712 return fi;
17121713 }
17131714
@@ -2587,9 +2588,9 @@
25872588 || (type != TYPE_EQUAL && type != TYPE_NEQUAL))
25882589 {
25892590 if (rettv->v_type != var2.v_type)
2590- EMSG(_("E999: Can only compare List with List"));
2591+ EMSG(_("E691: Can only compare List with List"));
25912592 else
2592- EMSG(_("E999: Invalid operation for Lists"));
2593+ EMSG(_("E692: Invalid operation for Lists"));
25932594 clear_tv(rettv);
25942595 clear_tv(&var2);
25952596 return FAIL;
@@ -2609,9 +2610,9 @@
26092610 || (type != TYPE_EQUAL && type != TYPE_NEQUAL))
26102611 {
26112612 if (rettv->v_type != var2.v_type)
2612- EMSG(_("E999: Can only compare Funcref with Funcref"));
2613+ EMSG(_("E693: Can only compare Funcref with Funcref"));
26132614 else
2614- EMSG(_("E999: Invalid operation for Funcrefs"));
2615+ EMSG(_("E694: Invalid operation for Funcrefs"));
26152616 clear_tv(rettv);
26162617 clear_tv(&var2);
26172618 return FAIL;
@@ -3115,7 +3116,7 @@
31153116
31163117 if (rettv->v_type == VAR_FUNC)
31173118 {
3118- EMSG(_("E999: Cannot index a Funcref"));
3119+ EMSG(_("E695: Cannot index a Funcref"));
31193120 return FAIL;
31203121 }
31213122
@@ -3588,7 +3589,7 @@
35883589 break;
35893590 if (**arg != ',')
35903591 {
3591- EMSG2(_("E999: Missing comma in list: %s"), *arg);
3592+ EMSG2(_("E696: Missing comma in list: %s"), *arg);
35923593 goto failret;
35933594 }
35943595 *arg = skipwhite(*arg + 1);
@@ -3596,7 +3597,7 @@
35963597
35973598 if (**arg != ']')
35983599 {
3599- EMSG2(_("E999: Missing end of list ']': %s"), *arg);
3600+ EMSG2(_("E697: Missing end of list ']': %s"), *arg);
36003601 failret:
36013602 if (evaluate)
36023603 list_free(l);
@@ -3952,7 +3953,7 @@
39523953 return NULL;
39533954 if (recurse >= VAR_LIST_MAXNEST)
39543955 {
3955- EMSG(_("E999: List nested too deep for making a copy"));
3956+ EMSG(_("E698: List nested too deep for making a copy"));
39563957 return NULL;
39573958 }
39583959 ++recurse;
@@ -4178,6 +4179,7 @@
41784179 {"did_filetype", 0, 0, f_did_filetype},
41794180 {"diff_filler", 1, 1, f_diff_filler},
41804181 {"diff_hlID", 2, 2, f_diff_hlID},
4182+ {"empty", 1, 1, f_empty},
41814183 {"escape", 2, 2, f_escape},
41824184 {"eventhandler", 0, 0, f_eventhandler},
41834185 {"executable", 1, 1, f_executable},
@@ -5118,7 +5120,7 @@
51185120 {
51195121 if (argc == MAX_FUNC_ARGS)
51205122 {
5121- EMSG(_("E999: Too many arguments"));
5123+ EMSG(_("E699: Too many arguments"));
51225124 break;
51235125 }
51245126 /* Make a copy of each argument (is this really needed?) */
@@ -5510,6 +5512,38 @@
55105512 }
55115513
55125514 /*
5515+ * "empty({expr})" function
5516+ */
5517+ static void
5518+f_empty(argvars, rettv)
5519+ typeval *argvars;
5520+ typeval *rettv;
5521+{
5522+ int n;
5523+
5524+ switch (argvars[0].v_type)
5525+ {
5526+ case VAR_STRING:
5527+ case VAR_FUNC:
5528+ n = argvars[0].vval.v_string == NULL
5529+ || *argvars[0].vval.v_string == NUL;
5530+ break;
5531+ case VAR_NUMBER:
5532+ n = argvars[0].vval.v_number == 0;
5533+ break;
5534+ case VAR_LIST:
5535+ n = argvars[0].vval.v_list == NULL
5536+ || argvars[0].vval.v_list->lv_first == NULL;
5537+ break;
5538+ default:
5539+ EMSG2(_(e_intern2), "f_empty()");
5540+ n = 0;
5541+ }
5542+
5543+ rettv->vval.v_number = n;
5544+}
5545+
5546+/*
55135547 * "escape({string}, {chars})" function
55145548 */
55155549 static void
@@ -6070,7 +6104,7 @@
60706104 if (s == NULL || *s == NUL || isdigit(*s))
60716105 EMSG2(_(e_invarg2), s);
60726106 else if (!function_exists(s))
6073- EMSG2(_("E999: Unknown function: %s"), s);
6107+ EMSG2(_("E700: Unknown function: %s"), s);
60746108 else
60756109 {
60766110 rettv->vval.v_string = vim_strsave(s);
@@ -7710,7 +7744,7 @@
77107744 rettv->vval.v_number = list_len(argvars[0].vval.v_list);
77117745 break;
77127746 default:
7713- EMSG(_("E999: Invalid type for len()"));
7747+ EMSG(_("E701: Invalid type for len()"));
77147748 break;
77157749 }
77167750 }
@@ -9413,7 +9447,7 @@
94139447 if (item_compare_func != NULL
94149448 && item_compare2((void *)&ptrs[0], (void *)&ptrs[1])
94159449 == ITEM_COMPARE_FAIL)
9416- EMSG(_("E999: Sort compare function failed"));
9450+ EMSG(_("E702: Sort compare function failed"));
94179451 else
94189452 {
94199453 /* Sort the array with item pointers. */
@@ -11048,7 +11082,7 @@
1104811082 n = (long)(varp->vval.v_number);
1104911083 break;
1105011084 case VAR_FUNC:
11051- EMSG(_("E999: Using function reference as a number"));
11085+ EMSG(_("E703: Using function reference as a number"));
1105211086 break;
1105311087 case VAR_STRING:
1105411088 if (varp->vval.v_string != NULL)
@@ -11420,12 +11454,12 @@
1142011454 && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':')
1142111455 ? name[2] : name[0]))
1142211456 {
11423- EMSG2(_("E999: Funcref variable name must start with a capital: %s"), name);
11457+ EMSG2(_("E704: Funcref variable name must start with a capital: %s"), name);
1142411458 return;
1142511459 }
1142611460 if (function_exists(name))
1142711461 {
11428- EMSG2(_("E999: Variable name conflicts with existing function: %s"), name);
11462+ EMSG2(_("705: Variable name conflicts with existing function: %s"), name);
1142911463 return;
1143011464 }
1143111465 }
@@ -11439,7 +11473,7 @@
1143911473 && (tv->v_type == VAR_STRING
1144011474 || tv->v_type == VAR_NUMBER)))
1144111475 {
11442- EMSG2(_("E999: Variable type mismatch for: %s"), name);
11476+ EMSG2(_("E706: Variable type mismatch for: %s"), name);
1144311477 return;
1144411478 }
1144511479 clear_tv(&v->tv);
@@ -12065,7 +12099,7 @@
1206512099 v = find_var(name, FALSE);
1206612100 if (v != NULL && v->tv.v_type == VAR_FUNC)
1206712101 {
12068- EMSG2(_("E999: Function name conflicts with variable: %s"), name);
12102+ EMSG2(_("E707: Function name conflicts with variable: %s"), name);
1206912103 goto erret;
1207012104 }
1207112105
Show on old repository browser