GNU bug report logs - #64537
mix lists and vectors when using backquote

Previous Next

Package: emacs;

Reported by: Shynur Xie <one.last.kiss <at> outlook.com>

Date: Sun, 9 Jul 2023 05:46:01 UTC

Severity: normal

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Shynur Xie <one.last.kiss <at> outlook.com>
Cc: 64537 <at> debbugs.gnu.org
Subject: Re: bug#64537: mix lists and vectors when using backquote
Date: Sat, 08 Jun 2024 19:45:45 -0400
>     `(... ,@[...])  ; by contrast: `(,@[] 1)  => (1)

AFAICT this is the result of an optimization:

    `(BAR ,@FOO)

is optimized to

    `(BAR . ,FOO)

I expect a fair bit of code "relies" on this optimization, so I'm not
sure we want to "fix" it.

>     `[,@'()]        ; by contrast: `[1 ,@'()] => [1]

This looks like a plain bug (probably linked to another optimization).

    `[,@(not t)]

doesn't suffer from this problem but

    `[,@'[]]

also suffers from it.


        Stefan





This bug report was last modified 1 year and 6 days ago.

Previous Next


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