GNU bug report logs - #15538
24.3; Incorrect Expansion of Nested Backquote

Previous Next

Package: emacs;

Reported by: 白井 彰 <okshirai <at> gmail.com>

Date: Sun, 6 Oct 2013 11:24:02 UTC

Severity: normal

Found in version 24.3

Fixed in version 24.4

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: 白井 彰 <okshirai <at> gmail.com>
Cc: 15538 <at> debbugs.gnu.org
Subject: bug#15538: 24.3; Incorrect Expansion of Nested Backquote
Date: Tue, 08 Oct 2013 00:30:45 -0400
> ``(,,@q)
> (\` ((\, r s)))
> ((3 5))                                 ; Incorrect: This should be ((3 5)
> (4 6))

Indeed, it's incorrect, but I think the intention of the current code is
to consider the above expression as invalid, so the error is to return
a value at step 2 (ignoring the second argument `s' to the unquote)
instead of signalling an error.

If you really want that result, you can do

 ``(,@(list ,@q))


> ``(,@,@q)

And here, you'd have to use

  ``(,@(append ,@q))

I installed a patch into trunk which catches the above problems and
signals an error if/when encountering such situations.
Thank you,


        Stefan




This bug report was last modified 11 years and 267 days ago.

Previous Next


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