Mercurial > vim
comparison src/create_cmdidxs.vim @ 17346:72ce5ca82a75 v8.1.1672
patch 8.1.1672: "make cmdidxs" doesn't work
commit https://github.com/vim/vim/commit/d94ac0caca12c6ceb54b07fc932edba84a5f60f2
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jul 12 20:24:59 2019 +0200
patch 8.1.1672: "make cmdidxs" doesn't work
Problem: "make cmdidxs" doesn't work.
Solution: Update macro names. (Naruhiko Nishino, closes https://github.com/vim/vim/issues/4660)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Jul 2019 20:30:06 +0200 |
parents | 854fb0ad4be6 |
children |
comparison
equal
deleted
inserted
replaced
17345:847e18dbfac2 | 17346:72ce5ca82a75 |
---|---|
12 | 12 |
13 let lines = readfile('ex_cmds.h') | 13 let lines = readfile('ex_cmds.h') |
14 let idx = 0 | 14 let idx = 0 |
15 while idx < len(lines) | 15 while idx < len(lines) |
16 let line = lines[idx] | 16 let line = lines[idx] |
17 if line =~ '^EX(CMD_' | 17 if line =~ '^EXCMD(CMD_' |
18 let m = matchlist(line, '^EX(CMD_\S*,\s*"\([a-z][^"]*\)"') | 18 let m = matchlist(line, '^EXCMD(CMD_\S*,\s*"\([a-z][^"]*\)"') |
19 if len(m) >= 2 | 19 if len(m) >= 2 |
20 let cmds += [ m[1] ] | 20 let cmds += [ m[1] ] |
21 else | 21 else |
22 let skipped_cmds += 1 | 22 let skipped_cmds += 1 |
23 endif | 23 endif |
25 let idx += 1 | 25 let idx += 1 |
26 let flags = lines[idx] | 26 let flags = lines[idx] |
27 let idx += 1 | 27 let idx += 1 |
28 let addr_type = lines[idx] | 28 let addr_type = lines[idx] |
29 | 29 |
30 if flags =~ '\<RANGE\>' | 30 if flags =~ '\<EX_RANGE\>' |
31 if addr_type =~ 'ADDR_NONE' | 31 if addr_type =~ 'ADDR_NONE' |
32 echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Using RANGE with ADDR_NONE: ' .. line | 32 echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Using EX_RANGE with ADDR_NONE: ' .. line |
33 endif | 33 endif |
34 else | 34 else |
35 if addr_type !~ 'ADDR_NONE' | 35 if addr_type !~ 'ADDR_NONE' |
36 echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing ADDR_NONE: ' .. line | 36 echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing ADDR_NONE: ' .. line |
37 endif | 37 endif |
38 endif | 38 endif |
39 | 39 |
40 if flags =~ '\<DFLALL\>' && (addr_type =~ 'ADDR_OTHER' || addr_type =~ 'ADDR_NONE') | 40 if flags =~ '\<EX_DFLALL\>' && (addr_type =~ 'ADDR_OTHER' || addr_type =~ 'ADDR_NONE') |
41 echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing misplaced DFLALL: ' .. line | 41 echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing misplaced EX_DFLALL: ' .. line |
42 endif | 42 endif |
43 endif | 43 endif |
44 let idx += 1 | 44 let idx += 1 |
45 endwhile | 45 endwhile |
46 | 46 |