From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: turn-on-bug-reference-mode, turn-on-bug-reference-prog-mode type functions Date: Sat, 03 Apr 2010 15:23:37 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1270322663 9873 80.91.229.12 (3 Apr 2010 19:24:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 3 Apr 2010 19:24:23 +0000 (UTC) Cc: Dan Nicolaescu , sds@gnu.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Apr 03 21:24:18 2010 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.69) (envelope-from ) id 1Ny8x4-0002uX-0h for ged-emacs-devel@m.gmane.org; Sat, 03 Apr 2010 21:24:14 +0200 Original-Received: from localhost ([127.0.0.1]:33460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ny8x3-0002FP-C3 for ged-emacs-devel@m.gmane.org; Sat, 03 Apr 2010 15:24:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ny8wZ-0001tu-7B for emacs-devel@gnu.org; Sat, 03 Apr 2010 15:23:43 -0400 Original-Received: from [140.186.70.92] (port=38868 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ny8wX-0001rM-Od for emacs-devel@gnu.org; Sat, 03 Apr 2010 15:23:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ny8wW-0003J6-NV for emacs-devel@gnu.org; Sat, 03 Apr 2010 15:23:41 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:42888 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ny8wU-0003Ic-RH; Sat, 03 Apr 2010 15:23:38 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkMGAPsxt0tFpZE8/2dsb2JhbACPU4t3crRPhQcEiyo X-IronPort-AV: E=Sophos;i="4.51,357,1267419600"; d="scan'208";a="60163507" Original-Received: from 69-165-145-60.dsl.teksavvy.com (HELO pastel.home) ([69.165.145.60]) by ironport2-out.pppoe.ca with ESMTP; 03 Apr 2010 15:23:38 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 95C4F85F0; Sat, 3 Apr 2010 15:23:37 -0400 (EDT) In-Reply-To: (Richard Stallman's message of "Sat, 03 Apr 2010 14:00:38 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.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:123142 Archived-At: > Another way to achieve this result is cleaner but a bigger change. It > would be to change the meaning of the expression (MINOR-MODE-FUNCTION) > so it turns the mode on, instead of toggling. This way, it would not > behave specially when called from a hook. And I think that this behavior > will seem more natural to people writing Lisp programs. It's on my secret plan for Emacs-24, yes. > However, we must not change the meaning of M-x MINOR-MODE-FUNCTION RET. > That must continue to toggle, as users expect. > We might want to invent another argument to make the Lisp function > toggle the minor mode. After all, the interactive call has to convey > that intention to the function via arguments. The invention is already in Emacs-23 (maybe it even was there in Emacs-22 already): minor modes defined with define-minor-mode already use `toggle' (rather than nil) as argument value when called interactively. So the change you suggest is a one-liner for all minor modes defined with define-minor-mode. The harder part is to convert all the remaining minor modes to use define-minor-mode. Stefan