Swaping Variables with cl-lib07 Sep 2014, by Artur Malabarba.
Common-Lisp in Emacs post series
On today's episode, we again find ourselves admiring the
and focus on a very little-known feature of Emacs,
psetq. Short for
“parallel-setq”, it takes the same syntax as
setq, but saves all
values before assigning.
For instance, if one needs to swap the variables
assuming you've required
cl-lib, you can simply do the following.
And, of course, it has also been generalized to
psetf for assigning