From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: add-hook and lambda functions Date: Sun, 01 Apr 2007 09:45:53 +0200 Message-ID: <85k5wwo7v2.fsf@lola.goethe.zz> References: <460D7012.6010608@gmail.com> <87ps6pgt5e.fsf@stupidchicken.com> <460EF973.50406@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1175413580 25452 80.91.229.12 (1 Apr 2007 07:46:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 Apr 2007 07:46:20 +0000 (UTC) Cc: Chong Yidong , rms@gnu.org, emacs-devel@gnu.org To: "Lennart Borgman \(gmail\)" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 01 09:46:17 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 1HXulU-00006J-IC for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 09:46:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXuoN-00015C-2J for ged-emacs-devel@m.gmane.org; Sun, 01 Apr 2007 03:49:15 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HXuoH-0000yv-JO for emacs-devel@gnu.org; Sun, 01 Apr 2007 03:49:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HXuoD-0000mM-Oz for emacs-devel@gnu.org; Sun, 01 Apr 2007 03:49:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HXuoD-0000lw-L8 for emacs-devel@gnu.org; Sun, 01 Apr 2007 03:49:05 -0400 Original-Received: from mail-in-01.arcor-online.net ([151.189.21.41]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HXulG-000339-L4; Sun, 01 Apr 2007 03:46:03 -0400 Original-Received: from mail-in-01-z2.arcor-online.net (mail-in-10-z2.arcor-online.net [151.189.8.27]) by mail-in-01.arcor-online.net (Postfix) with ESMTP id 863BB15C0A1; Sun, 1 Apr 2007 09:45:55 +0200 (CEST) Original-Received: from mail-in-13.arcor-online.net (mail-in-13.arcor-online.net [151.189.21.53]) by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 7B15423D2CD; Sun, 1 Apr 2007 09:45:55 +0200 (CEST) Original-Received: from lola.goethe.zz (dslb-084-061-055-024.pools.arcor-ip.net [84.61.55.24]) by mail-in-13.arcor-online.net (Postfix) with ESMTP id 386E5225124; Sun, 1 Apr 2007 09:45:55 +0200 (CEST) Original-Received: by lola.goethe.zz (Postfix, from userid 1002) id 508721C460AC; Sun, 1 Apr 2007 09:45:54 +0200 (CEST) In-Reply-To: <460EF973.50406@gmail.com> (Lennart Borgman's message of "Sun\, 01 Apr 2007 02\:14\:43 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 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:68880 Archived-At: "Lennart Borgman (gmail)" writes: > 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. I find it surprising to have turn-off-hideshow without a corresponding turn-on-hideshow. Is the latter not expected to be used? I don't know hideshow enough to give an educated guess. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum