From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: add-hook and lambda functions Date: Sun, 01 Apr 2007 02:14:43 +0200 Message-ID: <460EF973.50406@gmail.com> References: <460D7012.6010608@gmail.com> <87ps6pgt5e.fsf@stupidchicken.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: sea.gmane.org 1175386553 30835 80.91.229.12 (1 Apr 2007 00:15:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Apr 2007 00:15:53 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 01 02:15:48 2007 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 1HXnjW-0000mW-Em for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 02:15:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXnmN-0005b7-GI for ged-emacs-devel@m.gmane.org; Sat, 31 Mar 2007 19:18:43 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HXnlS-000563-Rm for emacs-devel@gnu.org; Sat, 31 Mar 2007 20:17:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HXnlP-00050m-87 for emacs-devel@gnu.org; Sat, 31 Mar 2007 20:17:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXnlP-00050O-2F for emacs-devel@gnu.org; Sat, 31 Mar 2007 19:17:43 -0500 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HXniW-0000fe-CY; Sat, 31 Mar 2007 20:14:44 -0400 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:63239 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1HXniU-00056m-4d; Sun, 01 Apr 2007 02:14:43 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666 In-Reply-To: <87ps6pgt5e.fsf@stupidchicken.com> X-Antivirus: avast! (VPS 000729-2, 2007-03-31), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1HXniU-00056m-4d. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1HXniU-00056m-4d 0a7e496c7b864cd981ececa83321f3ec X-detected-kernel: Linux 2.6? (barebone, rare!) 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:68871 Archived-At: Chong Yidong wrote: > Richard Stallman writes: > >> In hs-minor-mode a lambda function is added to the hook: >> >> (add-hook 'change-major-mode-hook >> (lambda () (hs-minor-mode -1)) >> nil t) >> >> Using a lambda function makes it a bit cumbersome to remove this hook if >> you want to. I would therefor prefer if named functions where used >> instead. Could this please be changed? >> >> I agree. >> >> There is no need to systematically change all such places, >> at least not now; but if any of them actually gets in someone's way, >> let's change it. Apparently this one did. > > Done. Thanks. It was very good to get this one done before the release.