Mirror of the Vim source from https://github.com/vim/vim
Revision | 8173ec1e9f1f746657dd598b6e876b11c99e1049 (tree) |
---|---|
Time | 2005-01-09 01:11:57 |
Author | vimboss |
Commiter | vimboss |
updated for version 7.0034
@@ -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 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -292,7 +292,7 @@ | ||
292 | 292 | |
293 | 293 | 5.1 using Vim's internal grep |
294 | 294 | |
295 | - *:vim* *:vimgrep* | |
295 | + *:vim* *:vimgrep* *E682* *E683* | |
296 | 296 | :vim[grep][!] /{pattern}/ {file} ... |
297 | 297 | Search for {pattern} in the files {file} ... and set |
298 | 298 | the error list to the matches. |
@@ -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 | |
2 | 2 | |
3 | 3 | |
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -30,9 +30,7 @@ | ||
30 | 30 | *known-bugs* |
31 | 31 | -------------------- Known bugs and current work ----------------------- |
32 | 32 | |
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. | |
36 | 34 | |
37 | 35 | Use 'ignorecase' for ":vimgrep"? |
38 | 36 |
@@ -105,11 +105,11 @@ | ||
105 | 105 | |
106 | 106 | #define VAR_LIST_MAXNEST 100 /* maximum nesting of lists */ |
107 | 107 | 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"); | |
109 | 109 | static char *e_undefvar = N_("E121: Undefined variable: %s"); |
110 | 110 | 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"); | |
113 | 113 | |
114 | 114 | /* |
115 | 115 | * All user-defined global variables are stored in "variables". |
@@ -369,6 +369,7 @@ | ||
369 | 369 | static void f_did_filetype __ARGS((typeval *argvars, typeval *rettv)); |
370 | 370 | static void f_diff_filler __ARGS((typeval *argvars, typeval *rettv)); |
371 | 371 | static void f_diff_hlID __ARGS((typeval *argvars, typeval *rettv)); |
372 | +static void f_empty __ARGS((typeval *argvars, typeval *rettv)); | |
372 | 373 | static void f_escape __ARGS((typeval *argvars, typeval *rettv)); |
373 | 374 | static void f_eventhandler __ARGS((typeval *argvars, typeval *rettv)); |
374 | 375 | static void f_executable __ARGS((typeval *argvars, typeval *rettv)); |
@@ -1141,12 +1142,12 @@ | ||
1141 | 1142 | i = list_len(l); |
1142 | 1143 | if (semicolon == 0 && var_count < i) |
1143 | 1144 | { |
1144 | - EMSG(_("E999: Less targets than List items")); | |
1145 | + EMSG(_("E687: Less targets than List items")); | |
1145 | 1146 | return FAIL; |
1146 | 1147 | } |
1147 | 1148 | if (var_count - semicolon > i) |
1148 | 1149 | { |
1149 | - EMSG(_("E999: More targets than List items")); | |
1150 | + EMSG(_("E688: More targets than List items")); | |
1150 | 1151 | return FAIL; |
1151 | 1152 | } |
1152 | 1153 |
@@ -1574,7 +1575,7 @@ | ||
1574 | 1575 | { |
1575 | 1576 | if (tv->v_type != VAR_LIST || tv->vval.v_list == NULL) |
1576 | 1577 | { |
1577 | - EMSG(_("E999: Can only index a List")); | |
1578 | + EMSG(_("E689: Can only index a List")); | |
1578 | 1579 | p = NULL; |
1579 | 1580 | break; |
1580 | 1581 | } |
@@ -1707,7 +1708,7 @@ | ||
1707 | 1708 | expr = skipwhite(expr); |
1708 | 1709 | if (expr[0] != 'i' || expr[1] != 'n' || !vim_iswhite(expr[2])) |
1709 | 1710 | { |
1710 | - EMSG(_("E999: Missing \"in\" after :for")); | |
1711 | + EMSG(_("E690: Missing \"in\" after :for")); | |
1711 | 1712 | return fi; |
1712 | 1713 | } |
1713 | 1714 |
@@ -2587,9 +2588,9 @@ | ||
2587 | 2588 | || (type != TYPE_EQUAL && type != TYPE_NEQUAL)) |
2588 | 2589 | { |
2589 | 2590 | 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")); | |
2591 | 2592 | else |
2592 | - EMSG(_("E999: Invalid operation for Lists")); | |
2593 | + EMSG(_("E692: Invalid operation for Lists")); | |
2593 | 2594 | clear_tv(rettv); |
2594 | 2595 | clear_tv(&var2); |
2595 | 2596 | return FAIL; |
@@ -2609,9 +2610,9 @@ | ||
2609 | 2610 | || (type != TYPE_EQUAL && type != TYPE_NEQUAL)) |
2610 | 2611 | { |
2611 | 2612 | 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")); | |
2613 | 2614 | else |
2614 | - EMSG(_("E999: Invalid operation for Funcrefs")); | |
2615 | + EMSG(_("E694: Invalid operation for Funcrefs")); | |
2615 | 2616 | clear_tv(rettv); |
2616 | 2617 | clear_tv(&var2); |
2617 | 2618 | return FAIL; |
@@ -3115,7 +3116,7 @@ | ||
3115 | 3116 | |
3116 | 3117 | if (rettv->v_type == VAR_FUNC) |
3117 | 3118 | { |
3118 | - EMSG(_("E999: Cannot index a Funcref")); | |
3119 | + EMSG(_("E695: Cannot index a Funcref")); | |
3119 | 3120 | return FAIL; |
3120 | 3121 | } |
3121 | 3122 |
@@ -3588,7 +3589,7 @@ | ||
3588 | 3589 | break; |
3589 | 3590 | if (**arg != ',') |
3590 | 3591 | { |
3591 | - EMSG2(_("E999: Missing comma in list: %s"), *arg); | |
3592 | + EMSG2(_("E696: Missing comma in list: %s"), *arg); | |
3592 | 3593 | goto failret; |
3593 | 3594 | } |
3594 | 3595 | *arg = skipwhite(*arg + 1); |
@@ -3596,7 +3597,7 @@ | ||
3596 | 3597 | |
3597 | 3598 | if (**arg != ']') |
3598 | 3599 | { |
3599 | - EMSG2(_("E999: Missing end of list ']': %s"), *arg); | |
3600 | + EMSG2(_("E697: Missing end of list ']': %s"), *arg); | |
3600 | 3601 | failret: |
3601 | 3602 | if (evaluate) |
3602 | 3603 | list_free(l); |
@@ -3952,7 +3953,7 @@ | ||
3952 | 3953 | return NULL; |
3953 | 3954 | if (recurse >= VAR_LIST_MAXNEST) |
3954 | 3955 | { |
3955 | - EMSG(_("E999: List nested too deep for making a copy")); | |
3956 | + EMSG(_("E698: List nested too deep for making a copy")); | |
3956 | 3957 | return NULL; |
3957 | 3958 | } |
3958 | 3959 | ++recurse; |
@@ -4178,6 +4179,7 @@ | ||
4178 | 4179 | {"did_filetype", 0, 0, f_did_filetype}, |
4179 | 4180 | {"diff_filler", 1, 1, f_diff_filler}, |
4180 | 4181 | {"diff_hlID", 2, 2, f_diff_hlID}, |
4182 | + {"empty", 1, 1, f_empty}, | |
4181 | 4183 | {"escape", 2, 2, f_escape}, |
4182 | 4184 | {"eventhandler", 0, 0, f_eventhandler}, |
4183 | 4185 | {"executable", 1, 1, f_executable}, |
@@ -5118,7 +5120,7 @@ | ||
5118 | 5120 | { |
5119 | 5121 | if (argc == MAX_FUNC_ARGS) |
5120 | 5122 | { |
5121 | - EMSG(_("E999: Too many arguments")); | |
5123 | + EMSG(_("E699: Too many arguments")); | |
5122 | 5124 | break; |
5123 | 5125 | } |
5124 | 5126 | /* Make a copy of each argument (is this really needed?) */ |
@@ -5510,6 +5512,38 @@ | ||
5510 | 5512 | } |
5511 | 5513 | |
5512 | 5514 | /* |
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 | +/* | |
5513 | 5547 | * "escape({string}, {chars})" function |
5514 | 5548 | */ |
5515 | 5549 | static void |
@@ -6070,7 +6104,7 @@ | ||
6070 | 6104 | if (s == NULL || *s == NUL || isdigit(*s)) |
6071 | 6105 | EMSG2(_(e_invarg2), s); |
6072 | 6106 | else if (!function_exists(s)) |
6073 | - EMSG2(_("E999: Unknown function: %s"), s); | |
6107 | + EMSG2(_("E700: Unknown function: %s"), s); | |
6074 | 6108 | else |
6075 | 6109 | { |
6076 | 6110 | rettv->vval.v_string = vim_strsave(s); |
@@ -7710,7 +7744,7 @@ | ||
7710 | 7744 | rettv->vval.v_number = list_len(argvars[0].vval.v_list); |
7711 | 7745 | break; |
7712 | 7746 | default: |
7713 | - EMSG(_("E999: Invalid type for len()")); | |
7747 | + EMSG(_("E701: Invalid type for len()")); | |
7714 | 7748 | break; |
7715 | 7749 | } |
7716 | 7750 | } |
@@ -9413,7 +9447,7 @@ | ||
9413 | 9447 | if (item_compare_func != NULL |
9414 | 9448 | && item_compare2((void *)&ptrs[0], (void *)&ptrs[1]) |
9415 | 9449 | == ITEM_COMPARE_FAIL) |
9416 | - EMSG(_("E999: Sort compare function failed")); | |
9450 | + EMSG(_("E702: Sort compare function failed")); | |
9417 | 9451 | else |
9418 | 9452 | { |
9419 | 9453 | /* Sort the array with item pointers. */ |
@@ -11048,7 +11082,7 @@ | ||
11048 | 11082 | n = (long)(varp->vval.v_number); |
11049 | 11083 | break; |
11050 | 11084 | case VAR_FUNC: |
11051 | - EMSG(_("E999: Using function reference as a number")); | |
11085 | + EMSG(_("E703: Using function reference as a number")); | |
11052 | 11086 | break; |
11053 | 11087 | case VAR_STRING: |
11054 | 11088 | if (varp->vval.v_string != NULL) |
@@ -11420,12 +11454,12 @@ | ||
11420 | 11454 | && !ASCII_ISUPPER((name[0] != NUL && name[1] == ':') |
11421 | 11455 | ? name[2] : name[0])) |
11422 | 11456 | { |
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); | |
11424 | 11458 | return; |
11425 | 11459 | } |
11426 | 11460 | if (function_exists(name)) |
11427 | 11461 | { |
11428 | - EMSG2(_("E999: Variable name conflicts with existing function: %s"), name); | |
11462 | + EMSG2(_("705: Variable name conflicts with existing function: %s"), name); | |
11429 | 11463 | return; |
11430 | 11464 | } |
11431 | 11465 | } |
@@ -11439,7 +11473,7 @@ | ||
11439 | 11473 | && (tv->v_type == VAR_STRING |
11440 | 11474 | || tv->v_type == VAR_NUMBER))) |
11441 | 11475 | { |
11442 | - EMSG2(_("E999: Variable type mismatch for: %s"), name); | |
11476 | + EMSG2(_("E706: Variable type mismatch for: %s"), name); | |
11443 | 11477 | return; |
11444 | 11478 | } |
11445 | 11479 | clear_tv(&v->tv); |
@@ -12065,7 +12099,7 @@ | ||
12065 | 12099 | v = find_var(name, FALSE); |
12066 | 12100 | if (v != NULL && v->tv.v_type == VAR_FUNC) |
12067 | 12101 | { |
12068 | - EMSG2(_("E999: Function name conflicts with variable: %s"), name); | |
12102 | + EMSG2(_("E707: Function name conflicts with variable: %s"), name); | |
12069 | 12103 | goto erret; |
12070 | 12104 | } |
12071 | 12105 |