--- Begin Message ---
Subject: |
23.1; etags elisp and scheme "=" in names |
Date: |
Tue, 23 Feb 2010 09:09:59 +1100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux) |
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.
In GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5)
of 2009-09-14 on raven, modified by Debian
configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu'
'--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
'--localstatedir=/var/lib' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim'
'--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g
-O2' 'LDFLAGS=-g' 'CPPFLAGS=''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_AU
value of $XMODIFIERS: nil
locale-coding-system: iso-latin-1-unix
default-enable-multibyte-characters: t
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#5624: 23.1; etags elisp and scheme "=" in names |
Date: |
Sat, 08 Jul 2017 11:28:02 +0300 |
> From: Alex <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Wed, 14 Jun 2017 16:10:37 -0600
>
> Eli Zaretskii <address@hidden> writes:
>
> >> 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.
>
> Alright, I did both.
Thanks, pushed to master.
Sorry for such a long delay in pushing.
--- End Message ---