|
From: | Kevin Rodgers |
Subject: | Re: remove-hook creates a symbol if it doesn't exist |
Date: | Thu, 23 Oct 2008 21:12:19 -0600 |
User-agent: | Thunderbird 2.0.0.17 (Macintosh/20080914) |
Drew Adams wrote:
The function remove-hook creates a symbol if its HOOK arg doesn't exist as such:(remove-hook 'non-existent-hook 'some-function) ,-----[ C-h v non-existent-hook RET ] | non-existent-hook's value is nil| | Documentation:| Not documented as a variable.| | [back]`-----Actually, the read function interned the symbol.`read', on its own, doesn't assign a value. It interns a name, creating a symbol, but it doesn't give it a nil value.
Good point. So I tried to replicate the OP's error in Emacs 22.3, but:emacs -Q --eval "(progn (remove-hook 'non-existent-hook 'some-function) non-existant-hook)"
results in this error: Symbol's value as variable is void: non-existant-hook And:emacs -Q --eval "(progn (remove-hook 'non-existent-hook 'some-function) (describe-variable 'non-existant-hook))"
results in this *Help* buffer: non-existant-hook is void as a variable. Documentation: Not documented as a variable. -- Kevin Rodgers Denver, Colorado, USA
[Prev in Thread] | Current Thread | [Next in Thread] |