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: Sun, 11 Jun 2017 17:52:48 +0300	[thread overview]
Message-ID: <83poea60fz.fsf@gnu.org> (raw)
In-Reply-To: <878tkztic2.fsf@gmail.com> (message from Alex on Sat, 10 Jun 2017 19:37:49 -0600)

> From: Alex <agrambot@gmail.com>
> Date: Sat, 10 Jun 2017 19:37:49 -0600
> Cc: 5624@debbugs.gnu.org
> 
> Kevin Ryde <user42@zip.com.au> writes:
> 
> > If an elisp defun has an "=" char in its name, etags stops at that point
> > and the TAGS file doesn't have the whole name.  Eg. a foo.el containing
> >
> >     (defun foo==bar () (message "hi"))
> >
> > M-. foo==bar gives
> >
> >     No tags containing foo==bar
> >
> > The same seems to be true of scheme, eg. a foo.scm containing a similar
> >
> >     (define foo==bar 123)
> >
> > The way the tag line comes out means a single "=" at the end of a name,
> > or any number of them at the start of a name, ends up working, but I
> > believe it's legal (if unusual) to have them in the middle of a name
> > too.
> 
> This appears to be because in etags.c, all languages use the same
> `notinname' procedure to determine a valid identifier.

Yes.  But there are exceptions from this rule, where that is deemed
necessary.  For example, Ruby_functions has this:

	 /* Ruby method names can end in a '='.  Also, operator overloading can
	    define operators whose names include '='.  */
	  while (!notinname (*cp) || *cp == '=')
	    cp++;

> Shouldn't each language (optionally) use a different procedure to
> determine the bounds of an identifier? Lisp and Scheme, for instance,
> would not have '=' in their respective `notinname' procedures.

Feel free to work on this, if you want to scratch that particular
itch.  Alternatively, just augment notinname in language-specific
support code, like some of the supported languages already do.

TIA.





  reply	other threads:[~2017-06-11 14:52 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 [this message]
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
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=83poea60fz.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).