From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.devel Subject: Re: remove-hook creates a symbol if it doesn't exist Date: Thu, 23 Oct 2008 21:12:19 -0600 Message-ID: References: <87ej29ls7h.fsf@patagonia.sebmags.homelinux.org> <002101c933f1$7e6a7250$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1224817963 5306 80.91.229.12 (24 Oct 2008 03:12:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Oct 2008 03:12:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 24 05:13:44 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KtD7Q-0008C4-2h for ged-emacs-devel@m.gmane.org; Fri, 24 Oct 2008 05:13:44 +0200 Original-Received: from localhost ([127.0.0.1]:46973 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtD6K-0006Em-8l for ged-emacs-devel@m.gmane.org; Thu, 23 Oct 2008 23:12:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtD6F-0006EX-TG for emacs-devel@gnu.org; Thu, 23 Oct 2008 23:12:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtD6F-0006EH-DU for emacs-devel@gnu.org; Thu, 23 Oct 2008 23:12:31 -0400 Original-Received: from [199.232.76.173] (port=53837 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtD6F-0006EE-7a for emacs-devel@gnu.org; Thu, 23 Oct 2008 23:12:31 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:42995 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KtD6E-0004j4-R9 for emacs-devel@gnu.org; Thu, 23 Oct 2008 23:12:31 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KtD6C-000281-0o for emacs-devel@gnu.org; Fri, 24 Oct 2008 03:12:28 +0000 Original-Received: from c-67-161-145-183.hsd1.co.comcast.net ([67.161.145.183]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Oct 2008 03:12:28 +0000 Original-Received: from kevin.d.rodgers by c-67-161-145-183.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Oct 2008 03:12:28 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 45 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-67-161-145-183.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.17 (Macintosh/20080914) In-Reply-To: <002101c933f1$7e6a7250$0200a8c0@us.oracle.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104927 Archived-At: 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