diff options
| author | Eli Zaretskii | 2015-11-28 12:29:18 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-28 12:29:18 +0200 |
| commit | 690ccf0f0d9c609b809ff3d10475f259748e4773 (patch) | |
| tree | 1711189bcb2dff376cb234e1ed852cda40349ade /lib-src | |
| parent | 24703a0a89746feb3597d0ac2de65f0fabb7a2bc (diff) | |
| download | emacs-690ccf0f0d9c609b809ff3d10475f259748e4773.tar.gz emacs-690ccf0f0d9c609b809ff3d10475f259748e4773.zip | |
Fix Lua tags when a function name includes '.' or ':'
* lib-src/etags.c (Lua_functions): Add a tag for the last element
of a function name after a dot or a colon. (Bug#21934)
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/etags.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib-src/etags.c b/lib-src/etags.c index 8b980d365ef..5f985b027b2 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -4954,7 +4954,22 @@ Lua_functions (FILE *inf) | |||
| 4954 | (void)LOOKING_AT (bp, "local"); /* skip possible "local" */ | 4954 | (void)LOOKING_AT (bp, "local"); /* skip possible "local" */ |
| 4955 | 4955 | ||
| 4956 | if (LOOKING_AT (bp, "function")) | 4956 | if (LOOKING_AT (bp, "function")) |
| 4957 | get_tag (bp, NULL); | 4957 | { |
| 4958 | char *tag_name, *tp_dot, *tp_colon; | ||
| 4959 | |||
| 4960 | get_tag (bp, &tag_name); | ||
| 4961 | /* If the tag ends with ".foo" or ":foo", make an additional tag for | ||
| 4962 | "foo". */ | ||
| 4963 | tp_dot = strrchr (tag_name, '.'); | ||
| 4964 | tp_colon = strrchr (tag_name, ':'); | ||
| 4965 | if (tp_dot || tp_colon) | ||
| 4966 | { | ||
| 4967 | char *p = tp_dot > tp_colon ? tp_dot : tp_colon; | ||
| 4968 | int len_add = p - tag_name + 1; | ||
| 4969 | |||
| 4970 | get_tag (bp + len_add, NULL); | ||
| 4971 | } | ||
| 4972 | } | ||
| 4958 | } | 4973 | } |
| 4959 | } | 4974 | } |
| 4960 | 4975 | ||