Eli Zaretskii writes: >> From: Alex >> Cc: user42@zip.com.au, 5624@debbugs.gnu.org >> Date: Mon, 12 Jun 2017 21:31:57 -0600 >> >> > I think it would be much cleaner not to use get_tag for these >> > languages, but instead either call make_tag directly or write a >> > get_lispy_tag function which will DTRT for Lisp-like languages. >> > >> > Thanks. >> >> I wanted to reduce duplicated code, but I suppose it is cleaner that >> way. >> >> I've attached a patch below. > > Thanks. This looks OK to me, but please also add a test for this > problem, and make sure the previous tests still succeed. (The etags > test suite is in test/manual/etags/.) > >> +/* Similar to get_tag, but include '=' as part of the tag. */ >> +static void >> +get_lispy_tag (register char *bp, char **namepp) >> +{ >> + register char *cp = bp; >> + >> + if (*bp != '\0') >> + { >> + /* Go till you get to white space or a syntactic break */ >> + for (cp = bp + 1; !notinname (*cp) || *cp == '='; cp++) >> + continue; >> + make_tag (bp, cp - bp, true, >> + lb.buffer, cp - lb.buffer + 1, lineno, linecharno); >> + } >> + >> + if (namepp != NULL) >> + *namepp = savenstr (bp, cp - bp); >> +} > > It looks like none of the callers uses a non-NULL 2nd arg, so perhaps > just remove it, and its supporting code. Alright, I did both.