From: Bob Proulx <bob@proulx.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Get rid of free variable warning from other packages?
Date: Tue, 9 Apr 2013 13:35:31 -0600 [thread overview]
Message-ID: <20130409193531.GA1501@hysteria.proulx.com> (raw)
In-Reply-To: <CACeWA3grVHL9uZa+7sn7_JVUfnuykX5SiN2tXOnSr-Aag1ZanA@mail.gmail.com>
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
next prev parent reply other threads:[~2013-04-09 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-09 19:30 Get rid of free variable warning from other packages? Steven Degutis
2013-04-09 19:35 ` Bob Proulx [this message]
2013-04-09 22:13 ` Drew Adams
2013-04-09 22:22 ` Steven Degutis
2013-04-10 5:31 ` Andreas Röhler
2013-04-10 13:46 ` Drew Adams
2013-04-10 7:38 ` Kevin Rodgers
2013-04-10 13:55 ` Stefan Monnier
2013-04-15 2:37 ` Kevin Rodgers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130409193531.GA1501@hysteria.proulx.com \
--to=bob@proulx.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.