Subject: Re: bug#5624: 23.1; etags elisp and scheme "=" in names

From: Eli Zaretskii <[email-masked]>
Date: Sat, 08 Jul 2017 11:28:02 +0300

> From: Alex <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 14 Jun 2017 16:10:37 -0600
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: Alex <[email-masked]>
> >> Cc: [email-masked],  [email-masked]
> >> 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.

Thanks, pushed to master.

Sorry for such a long delay in pushing.