unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* help with variables inside alist
@ 2022-06-02 14:23 GH
  2022-06-02 14:42 ` [External] : " Drew Adams
  2022-06-02 19:48 ` GH
  0 siblings, 2 replies; 3+ messages in thread
From: GH @ 2022-06-02 14:23 UTC (permalink / raw)
  To: Help GNU Emacs


I need some like this:

#+begin_src elisp

(let ((A "str1")
      (B "str2"))
  (setq example
	'((sexp1 (("str3" . A)
		  ("str4" . A)))
	  (sexp2 (("str5" . B)))))
  ... )
  
#+end_src

But it set variables A and B as 'A and 'B instead "str1" and "str2"

How can I do?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [External] : help with variables inside alist
  2022-06-02 14:23 help with variables inside alist GH
@ 2022-06-02 14:42 ` Drew Adams
  2022-06-02 19:48 ` GH
  1 sibling, 0 replies; 3+ messages in thread
From: Drew Adams @ 2022-06-02 14:42 UTC (permalink / raw)
  To: GH, Help GNU Emacs

> I need some like this:
> 
> #+begin_src elisp
> 
> (let ((A "str1")
>       (B "str2"))
>   (setq example
> 	'((sexp1 (("str3" . A)
> 		  ("str4" . A)))
> 	  (sexp2 (("str5" . B)))))
>   ... )
> 
> #+end_src
> 
> But it set variables A and B as 'A and 'B instead "str1" and "str2"
> 
> How can I do?

https://emacs.stackexchange.com/q/7481/105



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help with variables inside alist
  2022-06-02 14:23 help with variables inside alist GH
  2022-06-02 14:42 ` [External] : " Drew Adams
@ 2022-06-02 19:48 ` GH
  1 sibling, 0 replies; 3+ messages in thread
From: GH @ 2022-06-02 19:48 UTC (permalink / raw)
  To: Help GNU Emacs


fixed with:

#+begin_src elisp

(let ((A "str1")
      (B "str2"))
  (setq example
	`((sexp1 (("str3" . ,A)
		  ("str4" . ,A)))
	  (sexp2 (("str5" . ,B)))))
   ... )

#+end_src



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-06-02 19:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-02 14:23 help with variables inside alist GH
2022-06-02 14:42 ` [External] : " Drew Adams
2022-06-02 19:48 ` GH

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).