From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: Re: global minor modes that can be overridden locally? Date: Tue, 12 Dec 2006 13:25:16 +0900 Message-ID: References: Reply-To: Miles Bader NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1165897547 3157 80.91.229.10 (12 Dec 2006 04:25:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Dec 2006 04:25:47 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 12 05:25:45 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GtzD5-00073d-2j for ged-emacs-devel@m.gmane.org; Tue, 12 Dec 2006 05:25:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtzD4-00031i-7o for ged-emacs-devel@m.gmane.org; Mon, 11 Dec 2006 23:25:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GtzCr-00031N-Vp for emacs-devel@gnu.org; Mon, 11 Dec 2006 23:25:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GtzCp-00030j-Uj for emacs-devel@gnu.org; Mon, 11 Dec 2006 23:25:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GtzCp-00030g-Pn for emacs-devel@gnu.org; Mon, 11 Dec 2006 23:25:27 -0500 Original-Received: from [202.32.8.193] (helo=tyo201.gate.nec.co.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GtzCk-00054q-0C; Mon, 11 Dec 2006 23:25:22 -0500 Original-Received: from relay11.aps.necel.com ([10.29.19.46]) by tyo201.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id kBC4PFBO006119; Tue, 12 Dec 2006 13:25:17 +0900 (JST) Original-Received: from relay21.aps.necel.com ([10.29.19.20] [10.29.19.20]) by relay11.aps.necel.com with ESMTP; Tue, 12 Dec 2006 13:25:16 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.97.235] [10.114.97.235]) by relay21.aps.necel.com with ESMTP; Tue, 12 Dec 2006 13:25:16 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id 8DDA53F7; Tue, 12 Dec 2006 13:25:16 +0900 (JST) Original-To: "Drew Adams" System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: (Drew Adams's message of "Mon\, 11 Dec 2006 20\:06\:25 -0800") Original-Lines: 39 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:63606 Archived-At: "Drew Adams" writes: >> Two different commands is the way we do it now. >> In the current scheme; foo-mode is the local toggle >> and global-foo-mode is the global toggle. > > Uh, I never heard of global-*-mode. Is that documented? global-auto-composition-mode global-auto-revert-mode global-cwarn-mode global-font-lock-mode global-hi-lock-mode global-hl-line-mode global-reveal-mode global-whitespace-mode They are documented. > I define a global minor mode using define-minor-mode with :global, and M-x > foo-mode is the global toggle for it. There is no global-foo-mode defined > for my mode by define-minor-mode with :global. You are confusing two slightly different situations. There are "true" global modes, which _only_ have a global effect, and wouldn't make sense as a local mode; an example is `tool-bar-mode'. Such modes are called FOO-mode because it is the obvious name (and adding "global-" to the beginning would be pointless and annoying). However there are global modes which are actually the effect of applying a local mode globally, that is, they enable or disable the corresponding local mode in all buffers. Such modes are called global-FOO-mode, because the fundamental mode in question is the local FOO-mode, and global-FOO-mode is merely a convenient adjunct. -Miles -- `Life is a boundless sea of bitterness'