bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eli Zaretskii
Subject: bug#5624: 23.1; etags elisp and scheme "=" in names
Date: Tue, 13 Jun 2017 17:28:51 +0300

> From: Alex <address@hidden>
> Cc: address@hidden,  address@hidden
> 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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]