GNU bug report logs - #47391
27.2; static list return from function and nconc

Previous Next

Package: emacs;

Reported by: Rajeev Narang <rajeev.jnk <at> sivalik.com>

Date: Thu, 25 Mar 2021 15:21:03 UTC

Severity: normal

Tags: fixed

Found in version 27.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Gregory Heytings <gregory <at> heytings.org>
To: Rajeev Narang <rajeev.jnk <at> sivalik.com>
Cc: 47391 <at> debbugs.gnu.org, emacs-devel <at> gnu.org
Subject: Re: bug#47391: 27.2; static list return from function and nconc
Date: Thu, 25 Mar 2021 15:55:37 +0000
[Message part 1 (text/plain, inline)]
>
> (defun fn () '(1 2))
>
> (nconc (fn) '(3))
> -> (1 2 3)
>
> (nconc (fn) '(3))
> -> (1 2 3 3) ? should be (1 2 3)
>

Why do you think this is a bug?  The docstring of "nconc" says: 
"Concatenate any number of lists by _altering_ them.  Only the last 
argument is not altered, and need not be a list."  (append (fn) '(3)) 
always returns (1 2 3).

>
> If this is not a bug, then hfy-invisible, hfy-face-to-style-i may need 
> to be fixed.
>

Does the attached patch fix the bug you see?
[0001-lisp-htmlfontify.el-hfy-invisible-Return-a-new-list-.patch (text/x-diff, attachment)]

This bug report was last modified 4 years and 54 days ago.

Previous Next


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