[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eval-after-load causes void-variable error
From: |
Le Wang |
Subject: |
Re: eval-after-load causes void-variable error |
Date: |
Fri, 18 Jan 2013 09:35:18 +0800 |
On Fri, Jan 18, 2013 at 8:07 AM, Barry Margolin <barmar@alum.mit.edu> wrote:
> When you use a feature name rather than a filename (i.e. a symbol rather
> than a string) in eval-after-load, it evals as soon as the feature is
> provided, not after the file is loaded. ffap.el contains
>
> (provide 'ffap)
>
> at the beginning of the file, so your expression gets evaluated before
> ffap-alist has been initialized. It really should be at the end, since
> the feature doesn't really exist until the whole file is loaded.
Definitely using the filename is preferred, however reading the source
of `eval-after-load' on 24.2.1 it seems like this has been "fixed".
;; For features, the after-load-alist elements get run when `provide' is
;; called rather than at the end of the file. So add an indirection to
;; make sure that `form' is really run "after-load" in case the provide
;; call happens early.
> --
> Barry Margolin, barmar@alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***
--
Le
- eval-after-load causes void-variable error, Sean McAfee, 2013/01/17
- Re: eval-after-load causes void-variable error, Barry Margolin, 2013/01/17
- Re: eval-after-load causes void-variable error,
Le Wang <=
- Re: eval-after-load causes void-variable error, Dmitry Gutov, 2013/01/17
- Message not available
- Re: eval-after-load causes void-variable error, Barry Margolin, 2013/01/18
- Re: eval-after-load causes void-variable error, Dmitry Gutov, 2013/01/18
- Message not available
- Re: eval-after-load causes void-variable error, Sean McAfee, 2013/01/18
- Re: eval-after-load causes void-variable error, Barry Margolin, 2013/01/18
- Re: eval-after-load causes void-variable error, Eli Zaretskii, 2013/01/18
- Message not available
- Re: eval-after-load causes void-variable error, Barry Margolin, 2013/01/18
- Re: eval-after-load causes void-variable error, Dmitry Gutov, 2013/01/18
- Message not available
- Re: eval-after-load causes void-variable error, Barry Margolin, 2013/01/18