unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Code in lisp reader and ,.
@ 2012-02-09 21:17 Michael Welsh Duggan
  0 siblings, 0 replies; only message in thread
From: Michael Welsh Duggan @ 2012-02-09 21:17 UTC (permalink / raw)
  To: emacs-devel

So, in common lisp, ,. is special in quasiquoted forms.  It is supposed
to work the same as ,@, except that ,. is a hint to the compiler that
the argument to ,. may be destructively modified.  Hence given:

  (setq foo '(a b) bar '(c d))
  (setq baz `(x ,@foo y ,.bar z))

baz will be (x a b y c d z), foo will be (a b), and bar could be
anything under the sun, but is probably either (c d) or (c d z), where
(eq bar (cddddr baz)) ==> t.

Now, emacs lisp's backquote macro does not handle the ,. form.  However,
the lisp reader does treat ,. specially:  `,.foo ==> (\,\. foo).

I suggest that either emacs lisp's backquote macro be modified to handle
,. (most simply by treating it as an alias of ,@), or the special
handling for it (lread.c:2838) should be removed.

-- 
Michael Welsh Duggan
(md5i@md5i.com)



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-02-09 21:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 21:17 Code in lisp reader and , Michael Welsh Duggan

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).