From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: How global is a define-global-minor-mode mode? Date: Fri, 29 Dec 2006 18:21:00 +0100 Message-ID: <45954E7C.8010700@gmail.com> References: <4581996F.3050700@student.lu.se> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1167412895 31327 80.91.229.10 (29 Dec 2006 17:21:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 29 Dec 2006 17:21:35 +0000 (UTC) Cc: Lennart Borgman , Drew Adams , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 29 18:21:33 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 1H0LPz-0007Nv-2T for ged-emacs-devel@m.gmane.org; Fri, 29 Dec 2006 18:21:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0LPy-0000qh-Cs for ged-emacs-devel@m.gmane.org; Fri, 29 Dec 2006 12:21:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H0LPl-0000qO-HN for emacs-devel@gnu.org; Fri, 29 Dec 2006 12:21:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H0LPk-0000pz-3X for emacs-devel@gnu.org; Fri, 29 Dec 2006 12:21:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0LPj-0000pw-VI for emacs-devel@gnu.org; Fri, 29 Dec 2006 12:21:04 -0500 Original-Received: from [80.76.149.213] (helo=ch-smtp02.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H0LPi-0001ox-Hg; Fri, 29 Dec 2006 12:21:02 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:60593 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1H0LPg-00085z-8k; Fri, 29 Dec 2006 18:21:01 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: rms@gnu.org In-Reply-To: X-Antivirus: avast! (VPS 0664-0, 2006-12-28), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1H0LPg-00085z-8k. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1H0LPg-00085z-8k e0eb701fdab5977fd6e3e69832034fce 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:64434 Archived-At: Richard Stallman wrote: > [I sent this message a few days ago but did not get a response. > Could we get the discussion moving again?] > > I am trying to use define-global-minor-mode, see below. I have > customized the global mode to be t, but when I open new buffers the > minor mode is not set in them. Is this a bug in define-global-minor-mode? > > My impression is that the global mode defined with > define-global-minor-mode does not affect all buffers to be created in > the future. It only catches buffers created by visiting files. > > If so, I think what is needed is to add this to the documentation of > define-global-minor-mode. > > Globally enabling the mode also affects buffers subsequently created > by visiting files, but not buffers subsequently created in other ways. > > Can anyone confirm that this is right? > I believe the problem is that the setup of the hook functions is not done as expected. I have my global minor mode set to t in customize, but I do not found the global mode hook functions in the hook after startup. (The global minor mode is t.) I think Drew said that the documentation for define-global-minor-mode needs some enhancement. I think that too, especially something could be mentioned about the difference using :global t with define-minor-mode. BTW, it looks to me that there is no way to catch creation of new buffers.