[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47391: 27.2; static list return from function and nconc
From: |
Philipp Stephani |
Subject: |
bug#47391: 27.2; static list return from function and nconc |
Date: |
Thu, 25 Mar 2021 16:28:26 +0100 |
Am Do., 25. März 2021 um 16:23 Uhr schrieb Rajeev Narang via Bug
reports for GNU Emacs, the Swiss army knife of text editors
<bug-gnu-emacs@gnu.org>:
>
> (defun fn () '(1 2))
>
> (nconc (fn) '(3))
> -> (1 2 3)
This is undefined behavior/unsupported. The value that (fn) evaluates
to is immutable, but nconc mutates it.
>
> (nconc (fn) '(3))
> -> (1 2 3 3) ? should be (1 2 3)
>
> If this is not a bug, then hfy-invisible, hfy-face-to-style-i may need to be
> fixed.
If they use this pattern, then they should indeed be fixed.
- bug#47391: 27.2; static list return from function and nconc,
Philipp Stephani <=