bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eval-after-load weirdness


From: Trent Buck
Subject: Re: eval-after-load weirdness
Date: Mon, 21 May 2007 09:27:00 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux)

"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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]