| www.delorie.com/gnu/docs/emacs/cl_14.html | search |
![]() Buy the book! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The psetq form is just like setq, except that multiple
assignments are done in parallel rather than sequentially.
setq. Given several symbol
and form pairs, it evaluates all the forms in advance
and then stores the corresponding variables afterwards.
(setq x 2 y 3)
(setq x (+ x y) y (* x y))
x
=> 5
y ; |
The simplest use of psetq is (psetq x y y x), which
exchanges the values of two variables. (The rotatef form
provides an even more convenient way to swap two variables;
see section 5.2.2 Modify Macros.)
psetq always returns nil.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |