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: turn-on-*-mode Date: Wed, 17 May 2006 16:08:11 -0400 Message-ID: References: <4469D3B6.2040904@student.lu.se> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1147896581 5991 80.91.229.2 (17 May 2006 20:09:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 17 May 2006 20:09:41 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 17 22:09:39 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FgSKv-0004gc-Ln for ged-emacs-devel@m.gmane.org; Wed, 17 May 2006 22:09:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgSKv-0005NF-68 for ged-emacs-devel@m.gmane.org; Wed, 17 May 2006 16:09:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FgSJa-0004uj-CL for emacs-devel@gnu.org; Wed, 17 May 2006 16:08:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FgSJZ-0004uG-Fy for emacs-devel@gnu.org; Wed, 17 May 2006 16:08:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FgSJZ-0004uB-9G for emacs-devel@gnu.org; Wed, 17 May 2006 16:08:13 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FgSMV-0008Eh-12 for emacs-devel@gnu.org; Wed, 17 May 2006 16:11:15 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1FgSJX-0006d5-53; Wed, 17 May 2006 16:08:11 -0400 Original-To: Miles Bader In-reply-to: (message from Miles Bader on Wed, 17 May 2006 11:18:16 +0900) 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:54652 Archived-At: Stefan had a (what I thought was) clever suggestion to deal with this: Make "...-mode" functions toggle only when used interactively (just as they only print a message when used interactively), and otherwise have them just enable the state unconditionally. This is an interesting idea. It would mean that there is no longer an argument you could use, noninteractively, to toggle the mode. But that is not a big loss, practically speaking; that is not something people want to do in code very often, and it is not very hard to toggle the mode by testing its value. Another drawback is simply that the interactive and noninteractive behavior of these commands will be different. I am not sure how big a problem that is. A possible variant of this idea that might be more compatible is to have `run-hooks' bind a global variable to t when running a hook (e.g. `running-hook'), and have mode function unconditionally enable the mode when that variable is non-nil. I like that less, because I think that special behavior for run-hooks is a bigger anomaly than different behavior for interactive and noninteractive calls. Anyway, these changes should not be considered until after the release.