From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: turning on minor modes from hooks Date: Mon, 31 Aug 2009 20:54:28 +0200 Message-ID: <87my5foluj.fsf@thinkpad.tsdh.de> References: <200908292125.n7TLPCdp005058@godzilla.ics.uci.edu> <87eiqui4yx.fsf@catnip.gol.com> <200908311130.50238.danc@merrillprint.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251745078 23355 80.91.229.12 (31 Aug 2009 18:57:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 31 Aug 2009 18:57:58 +0000 (UTC) Cc: Miles Bader , dann@ics.uci.edu, rms@gnu.org, emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 31 20:57:51 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 1MiC4c-0002G6-CA for ged-emacs-devel@m.gmane.org; Mon, 31 Aug 2009 20:57:50 +0200 Original-Received: from localhost ([127.0.0.1]:58843 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiC4b-0005b0-UY for ged-emacs-devel@m.gmane.org; Mon, 31 Aug 2009 14:57:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiC1Z-0003Vz-KE for emacs-devel@gnu.org; Mon, 31 Aug 2009 14:54:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiC1V-0003Tm-2O for emacs-devel@gnu.org; Mon, 31 Aug 2009 14:54:41 -0400 Original-Received: from [199.232.76.173] (port=37159 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiC1U-0003Th-UL for emacs-devel@gnu.org; Mon, 31 Aug 2009 14:54:36 -0400 Original-Received: from out1.smtp.messagingengine.com ([66.111.4.25]:58611) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MiC1G-0007Mv-4V; Mon, 31 Aug 2009 14:54:22 -0400 Original-Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 7F972599AF; Mon, 31 Aug 2009 14:54:16 -0400 (EDT) Original-Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 31 Aug 2009 14:54:16 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type; s=smtpout; bh=dgxLevjzhctDBm03mw67mmBpdjA=; b=C12gM+xjD3pEnDBNuc7ecFnXVAgJH+wHR7xmZfHm/7q3DC6zg/Iv4eT2KyjnSbU1p89mD8TxaD2INxpXsAsG5OtBLFW9xQVRV2sqych1WmunDL8/mRxroK7Yixgb2Lt14ip1nibrCCCGeiY/mJ1VRM1OEiHeoO9Iyh5/K8VBGmU= X-Sasl-enc: /dyUl48pqiLe0w6Fu/o7wGfl/B744dBBv+MSuFdHCSqL 1251744855 Original-Received: from thinkpad.tsdh.de (p54AF2CC4.dip0.t-ipconnect.de [84.175.44.196]) by mail.messagingengine.com (Postfix) with ESMTPA id 328C13ECBC; Mon, 31 Aug 2009 14:54:13 -0400 (EDT) In-Reply-To: <200908311130.50238.danc@merrillprint.com> (Daniel Colascione's message of "Mon, 31 Aug 2009 11:30:50 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Mail-Copies-To: never X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:114919 Archived-At: Daniel Colascione writes: Hi! >> A call with no arguments, as in (auto-save-mode), naturally ought to >> toggle the mode or turn it on. But (auto-save-mode nil) has the >> natural meaning of turning the mode off. >> >> Perhaps we could make minor mode functions take &rest arguments so >> they can distinguish those two cases. However, that could be a >> painful change, > > What about some kind of enable-minor-mode function? That's what a some minor modes already do, for example `turn-on-eldoc-mode', `turn-on-follow-mode', or `turn-on-gnus-dired-mode'. For some of them there's also a turn-off command. Maybe that's a good convention. If so, then probably things like `define-minor-mode' should generate those functions automatically. BTW, for me the toggling has never been a problem. When I customize some mode by putting stuff in its hook, I always define some `th-foo-mode-init' function where I put stuff into. And then it makes no difference in wether I write (some-minor-mode) or (some-minor-mode 1) there. But I agree that it's a problem when customizing with the `customize' interface... Bye, Tassilo