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 12:58:13 +0900 Message-ID: <87ocpygdgq.fsf@catnip.gol.com> References: <200908292125.n7TLPCdp005058@godzilla.ics.uci.edu> <87eiqui4yx.fsf@catnip.gol.com> <9CA8B839B73049A6A7B1AD1C4D92BFC3@us.oracle.com> <87ws4mgiea.fsf@catnip.gol.com> <9C22FA24EDA84F0D932AABDA29E290EF@us.oracle.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 1251604716 31696 80.91.229.12 (30 Aug 2009 03:58:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Aug 2009 03:58:36 +0000 (UTC) Cc: 'Dan Nicolaescu' , emacs-devel@gnu.org To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Aug 30 05:58:29 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 1MhbYj-0003Dg-4O for ged-emacs-devel@m.gmane.org; Sun, 30 Aug 2009 05:58:29 +0200 Original-Received: from localhost ([127.0.0.1]:43344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhbYi-0004tM-Aj for ged-emacs-devel@m.gmane.org; Sat, 29 Aug 2009 23:58:28 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MhbYe-0004sm-8U for emacs-devel@gnu.org; Sat, 29 Aug 2009 23:58:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MhbYZ-0004oI-SD for emacs-devel@gnu.org; Sat, 29 Aug 2009 23:58:23 -0400 Original-Received: from [199.232.76.173] (port=50104 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MhbYZ-0004oA-KY for emacs-devel@gnu.org; Sat, 29 Aug 2009 23:58:19 -0400 Original-Received: from smtp11.dentaku.gol.com ([203.216.5.73]:60484) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MhbYX-0008IH-8G; Sat, 29 Aug 2009 23:58:17 -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 1MhbYU-00039F-F0; Sun, 30 Aug 2009 12:58:14 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 666B6DF8D; Sun, 30 Aug 2009 12:58:13 +0900 (JST) System-Type: x86_64-unknown-linux-gnu In-Reply-To: <9C22FA24EDA84F0D932AABDA29E290EF@us.oracle.com> (Drew Adams's message of "Sat, 29 Aug 2009 20:01:08 -0700") Original-Lines: 41 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:114868 Archived-At: "Drew Adams" writes: >> > So interactively a nil arg will toggle, but in Lisp a nil >> > arg will turn it on? And just why is that a great idea? >> >> Er, because it works the command work "as expected" in all contexts, >> instead of in just one. > > Er, and why would one "expect" a nil arg to work differently between Lisp and > interactive use? One "wouldn't", because it _won't_ work differently. The meaning of `nil' will change (from "toggle" to "set"). The argument passed to the function when invoked interactively is determined by the (interactive ...) form, so the (interactive ...) form will be changed to pass `toggle' instead of nil. > And why would one "expect" the _particular_ behavior difference you define? The toggling nature when invoked M-x is very natural, and ingrained; we've also observed that people expect the "set" behavior when using a mode as a hook. > I already agreed that most Lisp uses are not for toggling. I don't agree that > toggling in Lisp is so rare that it should be ignored. Especially if no real > advantage to doing so is given. It won't be "ignored", it will still be possible via use of `toggle' as an argument. The advantage is more natural use (and thus fewer usage bugs). [The rest of your email then completely ignores everything I've said before and proceeds to ask questions already answered. Maybe you truly didn't understand the answers and are honestly asking, but I'm sorry, I don't have the stomach for these long drawn out and insanely verbose arguing-for-the-sake-of-arguing threads.] -Miles -- "Though they may have different meanings, the cries of 'Yeeeee-haw!' and 'Allahu akbar!' are, in spirit, not actually all that different."