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

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

Re: Elisp - quoting or not?


From: Arthur Miller
Subject: Re: Elisp - quoting or not?
Date: Sat, 05 Dec 2020 07:42:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

David Masterson <dsmasterson92630@outlook.com> writes:

> I give up -- what's the proper way of doing this?
>
> (setq ab '("a" . "b")
>       cd '("c" . "d")
>       abcd '(ab cd))
>
> What I want is a result for abcd to be '(("a" . "b") ("c" . "d")). I
> imagine I need to use cons/car/cdr, but I'm not sure how.

I am not sure if you really wish that quite before the conses or not;

If you really wish to have quote try this:


(setq ab '("a" . "b")
      cd '("c" . "d")
      abcd  `'(,ab ,cd))

If not, try this:

(setq ab '("a" . "b")
      cd '("c" . "d")
      abcd `(,ab ,cd))

Helps?



reply via email to

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