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: Sat, 30 Dec 2006 11:57:15 +0100 Message-ID: <4596460B.8020003@gmail.com> References: <4581996F.3050700@student.lu.se> <45954E7C.8010700@gmail.com> NNTP-Posting-Host: lo.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 1167476265 15106 80.91.229.12 (30 Dec 2006 10:57:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 30 Dec 2006 10:57:45 +0000 (UTC) Cc: lennart.borgman.073@student.lu.se, drew.adams@oracle.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 30 11:57:43 2006 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 1H0buC-00048m-Ud for ged-emacs-devel@m.gmane.org; Sat, 30 Dec 2006 11:57:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0buC-0002t9-HB for ged-emacs-devel@m.gmane.org; Sat, 30 Dec 2006 05:57:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1H0btv-0002sn-P3 for emacs-devel@gnu.org; Sat, 30 Dec 2006 05:57:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1H0btt-0002s9-RX for emacs-devel@gnu.org; Sat, 30 Dec 2006 05:57:19 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H0btt-0002s4-Ko for emacs-devel@gnu.org; Sat, 30 Dec 2006 05:57:17 -0500 Original-Received: from [80.76.149.212] (helo=ch-smtp01.sth.basefarm.net) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1H0bts-0002H1-3w; Sat, 30 Dec 2006 05:57:16 -0500 Original-Received: from c83-254-145-24.bredband.comhem.se ([83.254.145.24]:63123 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.63) (envelope-from ) id 1H0btq-0008L2-4m; Sat, 30 Dec 2006 11:57:14 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) Original-To: rms@gnu.org In-Reply-To: X-Antivirus: avast! (VPS 0665-0, 2006-12-29), Outbound message X-Antivirus-Status: Clean X-Scan-Result: No virus found in message 1H0btq-0008L2-4m. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1H0btq-0008L2-4m a5b73fcb790531bc44e808f6e3169544 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:64483 Archived-At: Richard Stallman wrote: > 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.) > > That sounds like a bug. Can you debug it? Can you provide a > _precise_ self-contained test case so someone else can debug it? > Create a file tg.el in your emacs load-path: (define-minor-mode tg-mode "" :lighter " **TG** ") (define-global-minor-mode tg-globalized-mode tg-mode (lambda() (tg-mode 1))) Eval it and customize tg-globalized-mode permanently to t. Start Emacs again: emacs M-x load-library tg C-h v tg-globalized-mode => Its value is t C-h v tg-mode => Its value is nil Then try Mx tg-globalized-mode => Tg-Globalized mode disabled M-x tg-globalized-mode => Tg-Globalized mode enabled C-h v tg-mode => Its value is t