Mercurial > vim
comparison src/ex_docmd.c @ 11129:f4ea50924c6d v8.0.0452
patch 8.0.0452: some macros are in lower case
commit https://github.com/vim/vim/commit/1c46544412382db8b3203d6c78e550df885540bd
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 12 20:10:05 2017 +0100
patch 8.0.0452: some macros are in lower case
Problem: Some macros are in lower case.
Solution: Make a few more macros upper case.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 12 Mar 2017 20:15:06 +0100 |
parents | 506f5d8b7d8b |
children | 501f46f7644c |
comparison
equal
deleted
inserted
replaced
11128:23154628ab7f | 11129:f4ea50924c6d |
---|---|
2011 if (!checkforcmd(&ea.cmd, "silent", 3)) | 2011 if (!checkforcmd(&ea.cmd, "silent", 3)) |
2012 break; | 2012 break; |
2013 if (save_msg_silent == -1) | 2013 if (save_msg_silent == -1) |
2014 save_msg_silent = msg_silent; | 2014 save_msg_silent = msg_silent; |
2015 ++msg_silent; | 2015 ++msg_silent; |
2016 if (*ea.cmd == '!' && !vim_iswhite(ea.cmd[-1])) | 2016 if (*ea.cmd == '!' && !VIM_ISWHITE(ea.cmd[-1])) |
2017 { | 2017 { |
2018 /* ":silent!", but not "silent !cmd" */ | 2018 /* ":silent!", but not "silent !cmd" */ |
2019 ea.cmd = skipwhite(ea.cmd + 1); | 2019 ea.cmd = skipwhite(ea.cmd + 1); |
2020 ++emsg_silent; | 2020 ++emsg_silent; |
2021 ++did_esilent; | 2021 ++did_esilent; |
2769 * Check for a count. When accepting a BUFNAME, don't use "123foo" as a | 2769 * Check for a count. When accepting a BUFNAME, don't use "123foo" as a |
2770 * count, it's a buffer name. | 2770 * count, it's a buffer name. |
2771 */ | 2771 */ |
2772 if ((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg) | 2772 if ((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg) |
2773 && (!(ea.argt & BUFNAME) || *(p = skipdigits(ea.arg)) == NUL | 2773 && (!(ea.argt & BUFNAME) || *(p = skipdigits(ea.arg)) == NUL |
2774 || vim_iswhite(*p))) | 2774 || VIM_ISWHITE(*p))) |
2775 { | 2775 { |
2776 n = getdigits(&ea.arg); | 2776 n = getdigits(&ea.arg); |
2777 ea.arg = skipwhite(ea.arg); | 2777 ea.arg = skipwhite(ea.arg); |
2778 if (n <= 0 && !ni && (ea.argt & ZEROR) == 0) | 2778 if (n <= 0 && !ni && (ea.argt & ZEROR) == 0) |
2779 { | 2779 { |
2937 || ea.cmdidx == CMD_bunload) | 2937 || ea.cmdidx == CMD_bunload) |
2938 p = skiptowhite_esc(ea.arg); | 2938 p = skiptowhite_esc(ea.arg); |
2939 else | 2939 else |
2940 { | 2940 { |
2941 p = ea.arg + STRLEN(ea.arg); | 2941 p = ea.arg + STRLEN(ea.arg); |
2942 while (p > ea.arg && vim_iswhite(p[-1])) | 2942 while (p > ea.arg && VIM_ISWHITE(p[-1])) |
2943 --p; | 2943 --p; |
2944 } | 2944 } |
2945 ea.line2 = buflist_findpat(ea.arg, p, (ea.argt & BUFUNL) != 0, | 2945 ea.line2 = buflist_findpat(ea.arg, p, (ea.argt & BUFUNL) != 0, |
2946 FALSE, FALSE); | 2946 FALSE, FALSE); |
2947 if (ea.line2 < 0) /* failed */ | 2947 if (ea.line2 < 0) /* failed */ |
3755 } | 3755 } |
3756 in_quote = !in_quote; | 3756 in_quote = !in_quote; |
3757 } | 3757 } |
3758 /* An argument can contain just about everything, except | 3758 /* An argument can contain just about everything, except |
3759 * characters that end the command and white space. */ | 3759 * characters that end the command and white space. */ |
3760 else if (c == '|' || c == '\n' || c == '"' || (vim_iswhite(c) | 3760 else if (c == '|' || c == '\n' || c == '"' || (VIM_ISWHITE(c) |
3761 #ifdef SPACE_IN_FILENAME | 3761 #ifdef SPACE_IN_FILENAME |
3762 && (!(ea.argt & NOSPC) || usefilter) | 3762 && (!(ea.argt & NOSPC) || usefilter) |
3763 #endif | 3763 #endif |
3764 )) | 3764 )) |
3765 { | 3765 { |
5134 for (p = eap->arg; *p; ++p) | 5134 for (p = eap->arg; *p; ++p) |
5135 { | 5135 { |
5136 /* skip escaped characters */ | 5136 /* skip escaped characters */ |
5137 if (p[1] && (*p == '\\' || *p == Ctrl_V)) | 5137 if (p[1] && (*p == '\\' || *p == Ctrl_V)) |
5138 ++p; | 5138 ++p; |
5139 else if (vim_iswhite(*p)) | 5139 else if (VIM_ISWHITE(*p)) |
5140 { | 5140 { |
5141 *errormsgp = (char_u *)_("E172: Only one file name allowed"); | 5141 *errormsgp = (char_u *)_("E172: Only one file name allowed"); |
5142 return FAIL; | 5142 return FAIL; |
5143 } | 5143 } |
5144 } | 5144 } |
6334 /* Get the name (if any) and skip to the following argument */ | 6334 /* Get the name (if any) and skip to the following argument */ |
6335 name = p; | 6335 name = p; |
6336 if (ASCII_ISALPHA(*p)) | 6336 if (ASCII_ISALPHA(*p)) |
6337 while (ASCII_ISALNUM(*p)) | 6337 while (ASCII_ISALNUM(*p)) |
6338 ++p; | 6338 ++p; |
6339 if (!ends_excmd(*p) && !vim_iswhite(*p)) | 6339 if (!ends_excmd(*p) && !VIM_ISWHITE(*p)) |
6340 { | 6340 { |
6341 EMSG(_("E182: Invalid command name")); | 6341 EMSG(_("E182: Invalid command name")); |
6342 return; | 6342 return; |
6343 } | 6343 } |
6344 end = p; | 6344 end = p; |
6462 if (p[0] == '\\' && p[1] == '\\') | 6462 if (p[0] == '\\' && p[1] == '\\') |
6463 { | 6463 { |
6464 len += 2; | 6464 len += 2; |
6465 p += 2; | 6465 p += 2; |
6466 } | 6466 } |
6467 else if (p[0] == '\\' && vim_iswhite(p[1])) | 6467 else if (p[0] == '\\' && VIM_ISWHITE(p[1])) |
6468 { | 6468 { |
6469 len += 1; | 6469 len += 1; |
6470 p += 2; | 6470 p += 2; |
6471 } | 6471 } |
6472 else if (*p == '\\' || *p == '"') | 6472 else if (*p == '\\' || *p == '"') |
6473 { | 6473 { |
6474 len += 2; | 6474 len += 2; |
6475 p += 1; | 6475 p += 1; |
6476 } | 6476 } |
6477 else if (vim_iswhite(*p)) | 6477 else if (VIM_ISWHITE(*p)) |
6478 { | 6478 { |
6479 p = skipwhite(p); | 6479 p = skipwhite(p); |
6480 if (*p == NUL) | 6480 if (*p == NUL) |
6481 break; | 6481 break; |
6482 len += 3; /* "," */ | 6482 len += 3; /* "," */ |
6510 { | 6510 { |
6511 *q++ = '\\'; | 6511 *q++ = '\\'; |
6512 *q++ = '\\'; | 6512 *q++ = '\\'; |
6513 p += 2; | 6513 p += 2; |
6514 } | 6514 } |
6515 else if (p[0] == '\\' && vim_iswhite(p[1])) | 6515 else if (p[0] == '\\' && VIM_ISWHITE(p[1])) |
6516 { | 6516 { |
6517 *q++ = p[1]; | 6517 *q++ = p[1]; |
6518 p += 2; | 6518 p += 2; |
6519 } | 6519 } |
6520 else if (*p == '\\' || *p == '"') | 6520 else if (*p == '\\' || *p == '"') |
6521 { | 6521 { |
6522 *q++ = '\\'; | 6522 *q++ = '\\'; |
6523 *q++ = *p++; | 6523 *q++ = *p++; |
6524 } | 6524 } |
6525 else if (vim_iswhite(*p)) | 6525 else if (VIM_ISWHITE(*p)) |
6526 { | 6526 { |
6527 p = skipwhite(p); | 6527 p = skipwhite(p); |
6528 if (*p == NUL) | 6528 if (*p == NUL) |
6529 break; | 6529 break; |
6530 *q++ = '"'; | 6530 *q++ = '"'; |
7076 | 7076 |
7077 if (addr_type_complete[i].expand == -1) | 7077 if (addr_type_complete[i].expand == -1) |
7078 { | 7078 { |
7079 char_u *err = value; | 7079 char_u *err = value; |
7080 | 7080 |
7081 for (i = 0; err[i] != NUL && !vim_iswhite(err[i]); i++) | 7081 for (i = 0; err[i] != NUL && !VIM_ISWHITE(err[i]); i++) |
7082 ; | 7082 ; |
7083 err[i] = NUL; | 7083 err[i] = NUL; |
7084 EMSG2(_("E180: Invalid address type value: %s"), err); | 7084 EMSG2(_("E180: Invalid address type value: %s"), err); |
7085 return FAIL; | 7085 return FAIL; |
7086 } | 7086 } |
12262 match_delete(curwin, id, FALSE); | 12262 match_delete(curwin, id, FALSE); |
12263 | 12263 |
12264 if (ends_excmd(*eap->arg)) | 12264 if (ends_excmd(*eap->arg)) |
12265 end = eap->arg; | 12265 end = eap->arg; |
12266 else if ((STRNICMP(eap->arg, "none", 4) == 0 | 12266 else if ((STRNICMP(eap->arg, "none", 4) == 0 |
12267 && (vim_iswhite(eap->arg[4]) || ends_excmd(eap->arg[4])))) | 12267 && (VIM_ISWHITE(eap->arg[4]) || ends_excmd(eap->arg[4])))) |
12268 end = eap->arg + 4; | 12268 end = eap->arg + 4; |
12269 else | 12269 else |
12270 { | 12270 { |
12271 p = skiptowhite(eap->arg); | 12271 p = skiptowhite(eap->arg); |
12272 if (!eap->skip) | 12272 if (!eap->skip) |