emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange change in backquote expansion


From: Johan Bockgård
Subject: Re: Strange change in backquote expansion
Date: Sun, 19 Aug 2007 18:19:49 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>       ``(,,@(list (list arg))))
>
> I don't think that is a meaningful expression.  ,@ is supposed to be
> used inside of a list, to cause appending into that list.  Using it
> after a comma means it isn't in any visible list.


$ sbcl
This is SBCL 1.0, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses.  See the CREDITS and COPYING files in the
distribution for more information.
* (defmacro debug-macro-test (arg)
  ``(,,@(list (list arg))))

DEBUG-MACRO-TEST
* (macroexpand '(debug-macro-test foo))

`(,(FOO))
T
* (debug-macro-test *)

(1)



      So ,,@q means ``the value of q is a list of forms; splice the list
      of values of the elements of the value of q.''

[ Steele, Common Lisp the Language, 2nd edition, Appendix C. Backquote,
  http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node367.html ]

-- 
Johan Bockgård





reply via email to

[Prev in Thread] Current Thread [Next in Thread]