unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alex <agrambot@gmail.com>
Cc: 5624@debbugs.gnu.org, user42@zip.com.au
Subject: bug#5624: 23.1; etags elisp and scheme "=" in names
Date: Tue, 13 Jun 2017 17:28:51 +0300	[thread overview]
Message-ID: <83lgow3qsc.fsf@gnu.org> (raw)
In-Reply-To: <87mv9c36mq.fsf@gmail.com> (message from Alex on Mon, 12 Jun 2017 21:31:57 -0600)

> From: Alex <agrambot@gmail.com>
> 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.





  reply	other threads:[~2017-06-13 14:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 22:09 bug#5624: 23.1; etags elisp and scheme "=" in names Kevin Ryde
2017-06-11  1:37 ` Alex
2017-06-11 14:52   ` Eli Zaretskii
2017-06-12  2:44     ` Alex
2017-06-12 14:13       ` Eli Zaretskii
2017-06-13  3:31         ` Alex
2017-06-13 14:28           ` Eli Zaretskii [this message]
2017-06-14 22:10             ` Alex
2017-07-08  8:28               ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83lgow3qsc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=5624@debbugs.gnu.org \
    --cc=agrambot@gmail.com \
    --cc=user42@zip.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).