From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: add-hook and lambda functions Date: Sat, 31 Mar 2007 14:33:17 -0400 Message-ID: <87ps6pgt5e.fsf@stupidchicken.com> References: <460D7012.6010608@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175366342 10248 80.91.229.12 (31 Mar 2007 18:39:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 31 Mar 2007 18:39:02 +0000 (UTC) Cc: "Lennart Borgman \(gmail\)" , emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 31 20:39:00 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 1HXiTc-0006C2-Gs for ged-emacs-devel@m.gmane.org; Sat, 31 Mar 2007 20:39:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXiWR-0005ce-U7 for ged-emacs-devel@m.gmane.org; Sat, 31 Mar 2007 13:41:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HXiWP-0005ZL-Fn for emacs-devel@gnu.org; Sat, 31 Mar 2007 14:41:53 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXiWP-0005Yh-4N for emacs-devel@gnu.org; Sat, 31 Mar 2007 13:41:53 -0500 Original-Received: from south-station-annex.mit.edu ([18.72.1.2]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HXiTY-0003o7-VY; Sat, 31 Mar 2007 14:38:57 -0400 Original-Received: from grand-central-station.mit.edu (GRAND-CENTRAL-STATION.MIT.EDU [18.7.21.82]) by south-station-annex.mit.edu (8.13.6/8.9.2) with ESMTP id l2VIco7V011810; Sat, 31 Mar 2007 13:38:52 -0500 (EST) Original-Received: from outgoing-legacy.mit.edu (OUTGOING-LEGACY.MIT.EDU [18.7.22.104]) by grand-central-station.mit.edu (8.13.6/8.9.2) with ESMTP id l2VIXIw5023009; Sat, 31 Mar 2007 14:33:18 -0400 (EDT) Original-Received: from localhost ([18.19.7.211]) ) by outgoing-legacy.mit.edu (8.13.6/8.12.4) with ESMTP id l2VIXH0g005893; Sat, 31 Mar 2007 14:33:18 -0400 (EDT) Original-Received: from cyd by localhost with local (Exim 3.36 #1 (Debian)) id 1HXiO5-00046v-00; Sat, 31 Mar 2007 14:33:17 -0400 In-Reply-To: (Richard Stallman's message of "Sat\, 31 Mar 2007 03\:20\:04 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) X-Scanned-By: MIMEDefang 2.42 X-Spam-Score: -2.599 X-detected-kernel: Solaris 9.1 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:68843 Archived-At: 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.