[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question on pcase
From: |
Michael Heerdegen |
Subject: |
Re: Question on pcase |
Date: |
Mon, 26 Oct 2015 17:07:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Hi Oleh,
will read the rest of your post carefully later, but
> (macroexpand '(pcase test
> (`(,foo . ,baz)
> (cons baz foo))))
> ;; =>
> ;; (if (consp test)
> ;; (let* ((x (car test))
> ;; (x (cdr test)))
> ;; (let ((baz x)
> ;; (foo x))
> ;; (cons baz foo)))
> ;; nil)
>
> The macroexpanded code returns (2 . 2) when evaluated. This I don't
> understand.
This is due to printing again. With the default settings,
(compose print read)
(so to say) is not guaranteed to preserve semantics of code.
Try with
(setq print-gensym t)
(setq print-circle t)
as I had suggested in a prior post.
Regards,
Michael.
- Re: pcase docstring tweaks, (continued)
- Re: pcase docstring tweaks, Richard Stallman, 2015/10/27
- Re: pcase docstring tweaks, Michael Heerdegen, 2015/10/28
- RE: Question on pcase, Drew Adams, 2015/10/24
- Re: Question on pcase, Alan Mackenzie, 2015/10/24
- RE: Question on pcase, Drew Adams, 2015/10/24
- Re: Question on pcase, Johan Bockgård, 2015/10/24
- Re: Question on pcase, Michael Heerdegen, 2015/10/24
- Re: Question on pcase, Oleh Krehel, 2015/10/26
- Re: Question on pcase,
Michael Heerdegen <=
- Re: Question on pcase, Oleh Krehel, 2015/10/27
- Re: Question on pcase, Michael Heerdegen, 2015/10/26
- Re: Question on pcase, Oleh Krehel, 2015/10/27
- Re: Question on pcase, Michael Heerdegen, 2015/10/27
- Re: Question on pcase, Michael Heerdegen, 2015/10/27
- Re: Question on pcase, Michael Heerdegen, 2015/10/28
- Re: Question on pcase, Oleh Krehel, 2015/10/29
- Re: Question on pcase, Michael Heerdegen, 2015/10/29
- Re: Question on pcase, Andreas Schwab, 2015/10/26