From: Trent Buck <trentbuck@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: Re: eval-after-load weirdness
Date: Mon, 21 May 2007 09:27:00 +1000 [thread overview]
Message-ID: <87odkfnkjf.fsf@baal.lan> (raw)
In-Reply-To: 20070519035956.GA9040@baal.lan
"Trent Buck" <trentbuck@gmail.com> writes:
> I'm noticing the most bizarre symptom with my .emacs[0]:
> eval-after-load works right when passed a symbol, but not when
> passed a string. Some examples:
>
> $ emacs-unicode-2 -f toggle-debug-on-error `mktemp`
> Debugger entered--Lisp error: (void-variable vc-directory-exclusion-list)
> add-to-list(vc-directory-exclusion-list ".bzr" t)
> eval((add-to-list (quote vc-directory-exclusion-list) ".bzr" t))
> eval-after-load("vc" (add-to-list (quote vc-directory-exclusion-list) ".bzr" t))
I worked out what the trouble is: because my modular .emacs setup has
each configuration module named after the library it configures
(e.g. ~/.emacs-prefs/vc.el for the vc library), eval-after-load thinks
"vc" has already been loaded. Obviously (featurep 'vc) is still nil
so giving symbols to e-a-l works.
Some solutions suggested on #emacs:
- stuff everything back into a single .emacs;
- prefix filenames with digits (e.g. 20vc.el), like system V init
scripts; and
- instead of LOADing each config module, FIND-FILE it and then
EVAL-BUFFER it.
I produced a minimal example of the problem at
http://paste.lisp.org/display/41451
--
Trent Buck
next prev parent reply other threads:[~2007-05-20 23:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-19 3:59 eval-after-load weirdness Trent Buck
2007-05-20 23:27 ` Trent Buck [this message]
[not found] ` <mailman.896.1179710457.32220.bug-gnu-emacs@gnu.org>
2007-05-22 22:59 ` Miles Bader
2007-05-23 1:46 ` Trent Buck
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87odkfnkjf.fsf@baal.lan \
--to=trentbuck@gmail.com \
--cc=bug-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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).