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: How global is a define-global-minor-mode mode? Date: Tue, 23 Jan 2007 20:15:42 -0500 Message-ID: References: <4581996F.3050700@student.lu.se> <87y7nxmqzh.fsf@stupidchicken.com> <45B6A179.9020604@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1169601365 26148 80.91.229.12 (24 Jan 2007 01:16:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Jan 2007 01:16:05 +0000 (UTC) Cc: cyd@stupidchicken.com, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 24 02:15:59 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 1H9Wk2-000774-32 for ged-emacs-devel@m.gmane.org; Wed, 24 Jan 2007 02:15:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9Wk1-0001tT-Bv for ged-emacs-devel@m.gmane.org; Tue, 23 Jan 2007 20:15:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H9Wjq-0001tK-1a for emacs-devel@gnu.org; Tue, 23 Jan 2007 20:15:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H9Wjo-0001sx-Q7 for emacs-devel@gnu.org; Tue, 23 Jan 2007 20:15:45 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H9Wjo-0001su-MN for emacs-devel@gnu.org; Tue, 23 Jan 2007 20:15:44 -0500 Original-Received: from [209.226.175.93] (helo=tomts36-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1H9Wjn-0002ca-Fj; Tue, 23 Jan 2007 20:15:43 -0500 Original-Received: from pastel.home ([74.12.211.125]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070124011542.CIDX1862.tomts36-srv.bellnexxia.net@pastel.home>; Tue, 23 Jan 2007 20:15:42 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 5D9017F3D; Tue, 23 Jan 2007 20:15:42 -0500 (EST) Original-To: "Lennart Borgman \(gmail\)" In-Reply-To: <45B6A179.9020604@gmail.com> (Lennart Borgman's message of "Wed\, 24 Jan 2007 00\:59\:53 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) X-detected-kernel: Solaris 8 (1) 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:65435 Archived-At: >>>> Isn't it the case that it works if the minor mode function >>>> corresponding to the variable is autoloaded? Otherwise, IIRC you need >>>> to add a :require to the definition of the minor mode. >> >>> 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). > I have lost my way here, but I did some tests to try to understand. If I use > defcustom with a :set function this will be called when the elisp file is > loaded. Why can't something similar be done for define-global-minor-mode > also? It is a global mode and then :set is passed to defcustom, or? I don't understand your question. What do you suggest exactly and for what purpose? > BTW should not the name be define-globalized-minor-mode as was > suggested before? I believe so, yes. Feel free to implement this change, Stefan