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: Tue, 01 Sep 2009 07:15:53 +0900 Message-ID: <87r5ur7hpi.fsf@catnip.gol.com> References: <200908292125.n7TLPCdp005058@godzilla.ics.uci.edu> <87eiqui4yx.fsf@catnip.gol.com> 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 1251756981 30592 80.91.229.12 (31 Aug 2009 22:16:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Aug 2009 22:16:21 +0000 (UTC) Cc: dann@ics.uci.edu, rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 01 00:16:14 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 1MiFAZ-00087W-UM for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2009 00:16:12 +0200 Original-Received: from localhost ([127.0.0.1]:60708 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiFAZ-0000ob-5J for ged-emacs-devel@m.gmane.org; Mon, 31 Aug 2009 18:16:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiFAU-0000oC-9w for emacs-devel@gnu.org; Mon, 31 Aug 2009 18:16:06 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiFAP-0000ku-Ll for emacs-devel@gnu.org; Mon, 31 Aug 2009 18:16:06 -0400 Original-Received: from [199.232.76.173] (port=58998 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiFAP-0000kr-Ii for emacs-devel@gnu.org; Mon, 31 Aug 2009 18:16:01 -0400 Original-Received: from smtp11.dentaku.gol.com ([203.216.5.73]:51929) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MiFAM-0004IC-1V; Mon, 31 Aug 2009 18:15:58 -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 1MiFAI-0003l2-LN; Tue, 01 Sep 2009 07:15:54 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id F3FBE2BD46; Tue, 1 Sep 2009 07:15:53 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: (Stefan Monnier's message of "Mon, 31 Aug 2009 10:36:51 -0400") Original-Lines: 25 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:114922 Archived-At: Stefan Monnier writes: >> A call with no arguments, as in (auto-save-mode), naturally ought to >> toggle the mode or turn it on. > > Care to explain why? Note that he said "or turn it on"; I think the point was to distinguish those possibilities from "unconditionally turn it off". Probably most programmers would agree that having (foo-mode) unconditionally disable foo-mode would be pretty weird...! Having (foo-mode nil) turn it on or toggle is actually a bit weird too, though a bit less so... Using &rest is generally not a good idea because it conses, but... since mode functions are generally not called in inner loops, maybe it would be OK for this case...? [It would be nice if elisp supported cheap non-nil defaults for &optional args...] -miles -- Accordion, n. An instrument in harmony with the sentiments of an assassin.