help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: macro-replacement with quotes


From: Phillip Lord
Subject: Re: macro-replacement with quotes
Date: Mon, 25 Jan 2016 14:02:38 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Marcin Borkowski <mbork@mbork.pl> writes:
>
> Glad that it helped.
>
> It occurred to me now that another way might be to use something like
> ``(a b), which apparently yields a similar result, but less of a pain to
> type.
>
> Best,

It's a thought, so I tried this....

(defmacro p-test-2 (var)
  `(pcase 10
     ('`(,var) ,var)))


but this fails because the ' quotes the ` and the list following it. So
you get:

(p-test-2 a)

expands

(pcase 10
  ('`(,var)
   a))

It's all very complicated isn't it?

Phil





reply via email to

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