From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Idempotency of add-hook wrt lambda expressions Date: Wed, 4 Mar 2009 22:27:16 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1236202163 30460 80.91.229.12 (4 Mar 2009 21:29:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Mar 2009 21:29:23 +0000 (UTC) Cc: xah@xahlee.org, Geoff Gole , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 04 22:30:40 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 1Leyfg-0002Pt-Uq for ged-emacs-devel@m.gmane.org; Wed, 04 Mar 2009 22:30:33 +0100 Original-Received: from localhost ([127.0.0.1]:47814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeyeL-0006yZ-Gj for ged-emacs-devel@m.gmane.org; Wed, 04 Mar 2009 16:29:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Leyca-0005V4-Cj for emacs-devel@gnu.org; Wed, 04 Mar 2009 16:27:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeycZ-0005Tr-Eg for emacs-devel@gnu.org; Wed, 04 Mar 2009 16:27:19 -0500 Original-Received: from [199.232.76.173] (port=41554 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeycZ-0005Tl-8W for emacs-devel@gnu.org; Wed, 04 Mar 2009 16:27:19 -0500 Original-Received: from yx-out-1718.google.com ([74.125.44.152]:6414) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LeycY-0000JB-VF for emacs-devel@gnu.org; Wed, 04 Mar 2009 16:27:19 -0500 Original-Received: by yx-out-1718.google.com with SMTP id 34so2118319yxf.66 for ; Wed, 04 Mar 2009 13:27:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=SvHkivEJG46/SXXQYqckHT6ze0agY1zrrh1Ks5t0BEA=; b=kdo4q1l+e8oYw17ZmNJ8HGTcJuCZNK3XfG79zz8o2LSwpaA4H4pHkebBe8vP4oFM0A uBthkQDFtX02LNRxF8j9cQv3W9P3jz0AxuCVzcA0qbtO6gIT5SHwBqVPZJFZ41vLUeV3 odCZk0R4uSvWGQOQ6LMlDnJBF9UnDcPw5xGDU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=X9FF6DvXQ3sFNqjmBnsz6QAQTwpUewV9H2UZoQKCnKYRFkIkdoRJUobrkCaV2DwL3n caWE6xxIf9o/6KiWFW4uInU/SLWHkRaBFoBpGrouseAVFosFyRKq9sk6zMz8A9rEHMKw 5vVyJEl7kywjoqkt84QfgOA6zJD63vxGYlEkE= Original-Received: by 10.231.10.68 with SMTP id o4mr126113ibo.2.1236202036931; Wed, 04 Mar 2009 13:27:16 -0800 (PST) In-Reply-To: X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:109453 Archived-At: On Wed, Mar 4, 2009 at 10:23 PM, Stefan Monnier wrote: >> if the code suggested does fix this without any other problems, why not? > > Because it's a hack. =C2=A0So it takes care of 80% of the cases but still > doesn't fix the remaining cases. =C2=A0Fixing the remaining cases require= s > 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. Please do and do the same for menus. This would make it much easier to search for errors.