GNU bug report logs - #23648
[PATCH] `defun-declarations-alist' can be unintentionally modified

Previous Next

Package: emacs;

Reported by: Paul Pogonyshev <pogonyshev <at> gmail.com>

Date: Sun, 29 May 2016 14:12:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 25.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


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

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: npostavs <at> users.sourceforge.net, Paul Pogonyshev <pogonyshev <at> gmail.com>
Cc: 23648 <at> debbugs.gnu.org
Subject: Re: bug#23648: [PATCH] `defun-declarations-alist' can be
 unintentionally modified
Date: Mon, 18 Jul 2016 22:17:56 +0300
On 07/18/2016 06:00 AM, npostavs <at> users.sourceforge.net wrote:

>> Here `delete-dups' destructively modifies a list that includes
>> `defun-declarations-alist' as its tail verbatim, not as a copy.
>> Attached patch should fix that.
>
> I agree with analysis and patch here.

I like the patch as well. Maybe it would be better to use 
cl-remove-duplicates with nconc instead (the use of nil is a little 
non-obvious), but that would require having cl-lib loaded at runtime, 
and elisp-mode depending on it.

In any case, the proposed patch looks safe.





This bug report was last modified 8 years and 306 days ago.

Previous Next


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