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: How global is a define-global-minor-mode mode? Date: Sun, 28 Jan 2007 02:42:17 -0500 Message-ID: References: <4581996F.3050700@student.lu.se> <87y7nxmqzh.fsf@stupidchicken.com> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1169970306 10709 80.91.229.12 (28 Jan 2007 07:45:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 28 Jan 2007 07:45:06 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 28 08:45:00 2007 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 1HB4ih-0001eG-Da for ged-emacs-devel@m.gmane.org; Sun, 28 Jan 2007 08:44:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HB4ih-0003FT-4H for ged-emacs-devel@m.gmane.org; Sun, 28 Jan 2007 02:44:59 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HB4h0-000211-DF for emacs-devel@gnu.org; Sun, 28 Jan 2007 02:43:14 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HB4gz-00020R-Sq for emacs-devel@gnu.org; Sun, 28 Jan 2007 02:43:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HB4gz-00020F-IQ for emacs-devel@gnu.org; Sun, 28 Jan 2007 02:43:13 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.52) id 1HB4gz-0003UM-8l for emacs-devel@gnu.org; Sun, 28 Jan 2007 02:43:13 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HB4g5-00069d-Jp; Sun, 28 Jan 2007 02:42:17 -0500 In-reply-to: (message from Stefan Monnier on Tue, 23 Jan 2007 18:00:46 -0500) X-detected-kernel: 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:65557 Archived-At: > Not really: if the global minor mode is autoloaded, then :require is > a nuisance, > I don't follow. Could you explain why it is a nuisance? The :require thingy is a risk: if you move the definition of the mode to another file, then the user's customizations will be broken (it happened with global-font-lock-mode). It seems that you are saying the risk is that the :require has to specify the file name, so if you move the definition to another file, the :require argument will be wrong. If the :require is generated automatically, perhaps it would never be wrong. > And how does this relate to the question of whether the globalized > mode is autoloaded? If it's autoloaded, then the :require is not necessary because the handling of the autoload cookie will make sure that the minor mode function will be called when the user has customized the mode (and will thus trigger loading the relevant file). I don't see how that is the case. If the minor mode is autoloaded then calling the minor mode function will load the file. But how would this autoload cause the function to be called in the first place? > Are you proposing that every use of define-global-minor-mode should > have an autoload cookie? As a general rule, yes. I'm sure we can come up with counter examples, tho, so there's no point trying to enforce it. It might be an ok solution. But do you have any objection to using :require if we make sure it never gets the wrong file?