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

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

Re: how to get list of vectors with value from file content...


From: TheFlyingDutchman
Subject: Re: how to get list of vectors with value from file content...
Date: Wed, 08 Dec 2010 15:27:04 -0000
User-agent: G2/1.0

>
> (2) elisp vector elements are not evaluated. So, i cannot simply write
>
> (setq myPairList (list [A B] [A B] [A B]) )
>
> where the A B are already variables.
>
> i need to use aset.
>

>   (setq fr1 ["dummy" "dummy"] )
>   (setq fr2 ["dummy" "dummy"] )
>   (setq fr3 ["dummy" "dummy"] )
>
>   (aset fr1 0 findreplace_01_A)
>   (aset fr1 1 findreplace_01_B)
>   (aset fr2 0 findreplace_02_A)
>   (aset fr2 1 findreplace_02_B)
>   (aset fr3 0 findreplace_03_A)
>   (aset fr3 1 findreplace_03_B)
>

The vector function allows vectors to be created with symbol values.
So you can replace the above with:

  (setq fr1 (vector findreplace_01_A findreplace_01_B))
  (setq fr2 (vector findreplace_02_A findreplace_02_B))
  (setq fr3 (vector findreplace_03_A findreplace_03_B))


reply via email to

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