From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Idempotency of add-hook wrt lambda expressions Date: Wed, 04 Mar 2009 16:23:56 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1236201853 29401 80.91.229.12 (4 Mar 2009 21:24:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Mar 2009 21:24:13 +0000 (UTC) Cc: Geoff Gole , emacs-devel@gnu.org To: xah@xahlee.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 04 22:25:30 2009 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 1Leyak-0000Sf-Vm for ged-emacs-devel@m.gmane.org; Wed, 04 Mar 2009 22:25:27 +0100 Original-Received: from localhost ([127.0.0.1]:38180 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeyZP-0002Ws-KA for ged-emacs-devel@m.gmane.org; Wed, 04 Mar 2009 16:24:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeyZL-0002VN-Of for emacs-devel@gnu.org; Wed, 04 Mar 2009 16:23:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeyZK-0002Uw-AE for emacs-devel@gnu.org; Wed, 04 Mar 2009 16:23:59 -0500 Original-Received: from [199.232.76.173] (port=40880 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeyZK-0002Ut-3Y for emacs-devel@gnu.org; Wed, 04 Mar 2009 16:23:58 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:16980 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LeyZJ-0008LB-SG for emacs-devel@gnu.org; Wed, 04 Mar 2009 16:23:57 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQEANZ/rknO+KX2/2dsb2JhbACBTtcahAgGhAU X-IronPort-AV: E=Sophos;i="4.38,302,1233550800"; d="scan'208";a="34704341" Original-Received: from 206-248-165-246.dsl.teksavvy.com (HELO pastel.home) ([206.248.165.246]) by ironport2-out.teksavvy.com with ESMTP; 04 Mar 2009 16:23:57 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id C380D4B454; Wed, 4 Mar 2009 16:23:56 -0500 (EST) In-Reply-To: (xah lee's message of "Wed, 4 Mar 2009 12:13:08 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:109452 Archived-At: > if the code suggested does fix this without any other problems, why not? Because it's a hack. So it takes care of 80% of the cases but still doesn't fix the remaining cases. Fixing the remaining cases requires using a symbol, so just use a symbol and get on with your life. I'd much rather add a patch that complains when you pass a lambda to add-hook. Stefan