[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: elisp macros problem
From: |
Kalle Olavi Niemitalo |
Subject: |
Re: elisp macros problem |
Date: |
Sun, 25 Jul 2004 13:59:31 +0300 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Lowell Kirsh <lkirsh@cs.ubc.ca> writes:
> the reason that i didn't realize it was working was that i
> thought you could (add-hook 'some-mode ...) more than once, but
> really, this will just overwrite the previously added hook.
No, it won't.
(setq sample-hook '())
(add-hook 'sample-hook 'sample-1)
(add-hook 'sample-hook 'sample-2)
(add-hook 'sample-hook 'sample-2)
After these forms, the value of sample-hook is (sample-2 sample-1).
The second add-hook did not overwrite the first one.
However, the third one had no effect, because sample-2 was
already in the hook.
Re: elisp macros problem, Barry Margolin, 2004/07/24
Re: elisp macros problem, Lowell Kirsh, 2004/07/25
Re: elisp macros problem, Lowell Kirsh, 2004/07/25