GNU bug report logs - #52734
28.0.90; [PATCH] xref-backend-definitions in etags.el duplicates list

Previous Next

Package: emacs;

Reported by: David Fussner <dfussner <at> googlemail.com>

Date: Wed, 22 Dec 2021 15:03:01 UTC

Severity: normal

Tags: patch

Found in version 28.0.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 52734 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: David Fussner <dfussner <at> googlemail.com>, Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 52734 <at> debbugs.gnu.org
Subject: Re: bug#52734: 28.0.90;
 [PATCH] xref-backend-definitions in etags.el duplicates list
Date: Thu, 23 Dec 2021 11:12:33 +0200
> Date: Wed, 22 Dec 2021 15:01:54 +0000
> From:  David Fussner via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> When `etags-xref-prefer-current-file' is t and only the current file
> contains (multiple) definitions of the same function, the list returns
> each tag twice.  To reproduce:
> 
> cd src/
> ../lib-src/etags term.c
> ./emacs -Q term.c
> C-s tty_free_frame_resources RTN
> M-. RTN
> 
> src/term.c
> 3786: tty_free_frame_resources
> 3798: tty_free_frame_resources
> 
> (setq etags-xref-prefer-current-file t)
> M-.
> 
> src/term.c
> 3786: tty_free_frame_resources
> 3798: tty_free_frame_resources
> 3786: tty_free_frame_resources
> 3798: tty_free_frame_resources
> 
> The variable is new in 28.1, so I thought the bug might want fixing on
> this branch.  In my testing, cl-delete appears not to delete ITEMs from
> SEQ if such deletion would leave SEQ empty.  I can't find this behavior
> documented anywhere, but I may be looking in the wrong places.
> 
> Patch attached, which just tests for equality of the two lists of
> definitions, and only returns one of them in that case.

Dmitry, any comments?  The patch LGTM, FWIW.




This bug report was last modified 3 years and 151 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.