[Top][All Lists]

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

macro-replacement with quotes

From: Phillip Lord
Subject: macro-replacement with quotes
Date: Sun, 24 Jan 2016 21:56:01 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Is it possible to build a list within a macro which contains backquote,
quote or comma symbols in it?

Specifically, I was thinking of building a macro which expands to a
pcase form, but I need the ` symbol in the expansion.

For example, say I have a list

'(a b c)

which I want to expand to

`(,a ,b ,c)

Or in full I want to expand something like

(((a) a)
 ((a b) a b)
 ((a b c) a b c))


(pcase x
  (`(,a) a)
  (`(,a ,b) a b)
  (`(,a ,b ,c) a b c))


reply via email to

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