GNU bug report logs -
#5624
23.1; etags elisp and scheme "=" in names
Previous Next
Reported by: Kevin Ryde <user42 <at> zip.com.au>
Date: Mon, 22 Feb 2010 22:12:01 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Alex <agrambot <at> gmail.com>
> Cc: user42 <at> zip.com.au, 5624 <at> 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.
This bug report was last modified 8 years and 18 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.