|
From: | Kevin Rodgers |
Subject: | Re: Enabling/disabling minor modes based on major mode |
Date: | Tue, 22 Feb 2011 21:13:53 -0700 |
User-agent: | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
On 2/22/11 6:40 AM, Gary wrote:
Is there a nice, consistent, way to do this? From reading around I found ,---- | (add-hook 'term-mode-hook '(lambda() (set (make-local-variable | 'global-hl-line-mode) 0))) `---- but that's clearly specific to global-hl-line-mode. Or is it? Could I do the same with, say, yas/minor-mode for the yasnippet modes? Is ,---- | (set (make-local-variable '<minor-mode-name>) 0) `---- guaranteed to work for all minor modes?
No: Some minor modes can only be enabled/disabled by calling the mode's function with a positive/negative argument -- the mode's variable is just a read-only indicator of whether it is enabled or disabled. -- Kevin Rodgers Denver, Colorado, USA
[Prev in Thread] | Current Thread | [Next in Thread] |