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

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

Re: copy-region-as-kill => variable


From: Harald Hanche-Olsen
Subject: Re: copy-region-as-kill => variable
Date: Tue, 17 Jan 2006 02:46:19 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix)

+ Tim Johnson <tim@johnsons-web.com>:

| (defun copy-rad-tag-text ()
|   "Copy text inside of radio pseudo-tag to custom variable"

I should have guessed you had a more specialized itch scratch than you
were letting on.  8-)

| ;; I get a wrong-type-of-argument error with 'set, thus setq.

Yeah, set does an extra indirection, since it is an ordinary function:
Its first variable is evaluated - the value must be a symbol - and
then the value is assigned to that symbol.

So after, e.g.,

(let ((foo 'bar)) (set foo "Foo!"))

then bar has the value "Foo!"
It worked in my general function, but not in your specialized one.
Usually it's setq you want - set is for special occasions.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
  than thinking does: but it deprives us of whatever chance there is
  of getting closer to the truth.  -- C.P. Snow


reply via email to

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