From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: turning on minor modes from hooks Date: Tue, 01 Sep 2009 17:20:23 -0400 Message-ID: References: <200908292125.n7TLPCdp005058@godzilla.ics.uci.edu> <87eiqui4yx.fsf@catnip.gol.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: ger.gmane.org 1251840046 4120 80.91.229.12 (1 Sep 2009 21:20:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Sep 2009 21:20:46 +0000 (UTC) Cc: dann@ics.uci.edu, emacs-devel@gnu.org, miles@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 01 23:20:38 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 1MiamK-0004no-Ex for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2009 23:20:36 +0200 Original-Received: from localhost ([127.0.0.1]:36617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiamJ-0005Pm-SC for ged-emacs-devel@m.gmane.org; Tue, 01 Sep 2009 17:20:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiamD-0005Mg-8j for emacs-devel@gnu.org; Tue, 01 Sep 2009 17:20:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Miam8-0005Ga-OK for emacs-devel@gnu.org; Tue, 01 Sep 2009 17:20:28 -0400 Original-Received: from [199.232.76.173] (port=53951 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Miam8-0005GK-CS for emacs-devel@gnu.org; Tue, 01 Sep 2009 17:20:24 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:33593) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Miam7-0007f8-Vp for emacs-devel@gnu.org; Tue, 01 Sep 2009 17:20:24 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Miam7-0006fZ-3T; Tue, 01 Sep 2009 17:20:23 -0400 In-reply-to: (message from Stefan Monnier on Tue, 01 Sep 2009 12:19:27 -0400) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:114954 Archived-At: > When you call a major mode function, it selects that mode. > So when users call a minor mode function, they will expect it > to select that mode too. So you argue for "turn it on" rather than "toggle". Not necessarily. This case should't be considered in isolation but rather as part of an overall design for minor modes. One design that occurs to me is (foo-mode) turns it on, (foo-mode t) turns it on, (foo-mode nil) turns it off, and the way you toggle is (foo-mode (not foo-mode)). Another is (foo-mode) toggles, (foo-mode t) turns it on, (foo-mode nil) turns it off. I am not sure which of those is better. I don't think we should reject either out of hand. The current convention for interactive calls seems clear and natural so I think it should be preserved, whatever we do with calls from Lisp.