From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: turning on minor modes from hooks Date: Sun, 30 Aug 2009 08:18:46 +0900 Message-ID: <87eiqui4yx.fsf@catnip.gol.com> References: <200908292125.n7TLPCdp005058@godzilla.ics.uci.edu> Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251587951 2066 80.91.229.12 (29 Aug 2009 23:19:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 29 Aug 2009 23:19:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 30 01:19:03 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 1MhXCJ-0005ck-AP for ged-emacs-devel@m.gmane.org; Sun, 30 Aug 2009 01:19:03 +0200 Original-Received: from localhost ([127.0.0.1]:55584 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhXCI-0007xe-HY for ged-emacs-devel@m.gmane.org; Sat, 29 Aug 2009 19:19:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhXCD-0007xZ-Gz for emacs-devel@gnu.org; Sat, 29 Aug 2009 19:18:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhXC8-0007xN-3z for emacs-devel@gnu.org; Sat, 29 Aug 2009 19:18:56 -0400 Original-Received: from [199.232.76.173] (port=56430 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhXC7-0007xK-UX for emacs-devel@gnu.org; Sat, 29 Aug 2009 19:18:51 -0400 Original-Received: from smtp11.dentaku.gol.com ([203.216.5.73]:40555) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MhXC5-0006zK-58; Sat, 29 Aug 2009 19:18:49 -0400 Original-Received: from 218.231.109.79.eo.eaccess.ne.jp ([218.231.109.79] helo=catnip.gol.com) by smtp11.dentaku.gol.com with esmtpa (Dentaku) id 1MhXC3-0008Rb-1H; Sun, 30 Aug 2009 08:18:47 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 53D5EDF8D; Sun, 30 Aug 2009 08:18:46 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: <200908292125.n7TLPCdp005058@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Sat, 29 Aug 2009 14:25:12 -0700 (PDT)") Original-Lines: 23 X-Virus-Scanned: ClamAV GOL (outbound) X-Abuse-Complaints: abuse@gol.com X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:114860 Archived-At: Dan Nicolaescu writes: > (add-hook 'text-mode-hook 'auto-fill-mode) > > This avoids defining extra functions just for the purpose of being able > to call them from hooks. > > Not sure how feasible is to have a clean implementation of such a feature... Stephen has long advocated that non-interactive invocation of mode commands should always turn on the mode instead of toggling. I agree with that: I think the vast majority of uses in code do not use the toggling anyway, and while there probably are a few uses which would be broken by such a change, I think there would be far _more_ currently-incorrect uses that would be _fixed_ by such a change (where someone uses (add-hook 'foo-hook 'ack-mode) not realizing that it really toggles instead of turning on). -miles -- Acquaintance, n. A person whom we know well enough to borrow from, but not well enough to lend to.