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: Alex
Subject: bug#5624: 23.1; etags elisp and scheme "=" in names
Date: Wed, 14 Jun 2017 16:10:37 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

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.

Attachment: 0001-Include-in-Scheme-and-Lisp-tags-in-etags.patch
Description: etags


reply via email to

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