[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Get rid of free variable warning from other packages?
From: |
Bob Proulx |
Subject: |
Re: Get rid of free variable warning from other packages? |
Date: |
Tue, 9 Apr 2013 13:35:31 -0600 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Steven Degutis wrote:
> ... Is there a way to disable the warning that says I'm setqing a
> free variable?
Search for use of "eval-after-load" and you will find much discussion.
For example I routinely do things like this:
(eval-after-load 'text-mode
(add-hook 'text-mode-hook
(lambda ()
(abbrev-mode 1)
(auto-fill-mode 1))))
I think you should be able to map that example into something useful
for your mode case.
> Or better yet, is there a better way to set a variable that belongs to
> another package, only when my minor-mode is enabled, and have it reverted
> back when my minor-mode is disabled?
Most configuration variables are already buffer local.
http://emacswiki.org/emacs/BufferLocalVariable
http://www.gnu.org/software/emacs/manual/html_node/elisp/Creating-Buffer_002dLocal.html
Bob