From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: doc of defining minor modes Date: Fri, 19 May 2006 08:59:34 -0700 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1148054540 27666 80.91.229.2 (19 May 2006 16:02:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 May 2006 16:02:20 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 19 18:02:11 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 1Fh7Q1-0007dU-G4 for ged-emacs-devel@m.gmane.org; Fri, 19 May 2006 18:01:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fh7Q1-0002Ja-6v for ged-emacs-devel@m.gmane.org; Fri, 19 May 2006 12:01:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fh7OE-0001il-3y for emacs-devel@gnu.org; Fri, 19 May 2006 11:59:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fh7OC-0001h1-BF for emacs-devel@gnu.org; Fri, 19 May 2006 11:59:45 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fh7OC-0001gn-7X for emacs-devel@gnu.org; Fri, 19 May 2006 11:59:44 -0400 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1Fh7RX-0004zn-9k for emacs-devel@gnu.org; Fri, 19 May 2006 12:03:11 -0400 Original-Received: from rgmsgw300.us.oracle.com (rgmsgw300.us.oracle.com [138.1.186.49]) by agminet01.oracle.com (Switch-3.1.7/Switch-3.1.7) with ESMTP id k4JFxfsC028969 for ; Fri, 19 May 2006 10:59:42 -0500 Original-Received: from dradamslap (dhcp-amer-csvpn-gw1-141-144-66-197.vpn.oracle.com [141.144.66.197]) by rgmsgw300.us.oracle.com (Switch-3.1.7/Switch-3.1.7) with SMTP id k4JFxe0G030911 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 19 May 2006 09:59:41 -0600 Original-To: X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE 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:54814 Archived-At: No minor modes get enabled by anything except explicit enabling, unless they are harmless. That was the question: what does it mean to be harmless? The answer I got was that enabling the mode is always itself harmful, because it is disorienting. That implies that "unless they are harmless" means unless pigs fly. It is sometimes useful to enable a minor mode upon load I am not sure what that means. If you present a specific scenario I could think about it. A simple, standalone, external library that defines a minor mode. The user alone can load the library. (I don't see how it could be loaded automatically, since it is unknown to Emacs until it is loaded.) The user simply loads the library, turning on the mode automatically. Where's the problem? If the user wants to load the library without turning on the mode, then s?he sets the mode variable to nil first. Whether I'm right or wrong about a standalone library being harmless, the doc needs clarification. It is not at all clear why we provide :init-value and then tell people not to use it. The potential problem mentioned here involving automatic loading of a library behind the user's back is not mentioned in the doc, and it is the motivation behind the admonition not to use :init-value t. It's fine to issue a guideline "Don't do this!", but it helps to explain why the rule makes sense.