|
From: | Lennart Borgman (gmail) |
Subject: | Re: How global is a define-global-minor-mode mode? |
Date: | Sat, 30 Dec 2006 11:57:15 +0100 |
User-agent: | Thunderbird 1.5.0.9 (Windows/20061207) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |