Subject: bug#52734: 28.0.90; [PATCH] xref-backend-definitions in etags.el duplicates list

From: Dmitry Gutov <[email-masked]>
Date: Fri, 24 Dec 2021 02:25:47 +0200

Hi!

On 22.12.2021 18:01, David Fussner via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> 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.

The thing about cl-delete-if is it (like other sequence functions) has 
the changed sequence in its return value (which the piece of code under 
discussion leaves unused -- a brain fart on my part).

As a destructive function, it also modifies the original structure, but 
when the variable is still pointing at the first link of the linked 
list, the behavior is basically unpredictable. Even though it might look 
right most of the time under usual conditions.

See a different patch in the other email.