[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eval-after-load causes void-variable error
From: |
Barry Margolin |
Subject: |
Re: eval-after-load causes void-variable error |
Date: |
Fri, 18 Jan 2013 00:15:59 -0500 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <mailman.17773.1358479324.855.help-gnu-emacs@gnu.org>,
Dmitry Gutov <dgutov@yandex.ru> wrote:
> Barry Margolin <barmar@alum.mit.edu> writes:
>
> > In article <bp8ip6vs6xk.fsf@usca1uw-JZWWPM1.sanmateo.corp.akamai.com>,
> > Sean McAfee <eefacm@gmail.com> wrote:
> >
> >> For a long time I had this in my .emacs file:
> >>
> >> (require 'ffap)
> >> (add-to-list 'ffap-alist (cons +my-ffap-regexp+ #'my-ffap-hook))
> >>
> >> I recently decided to optimize it a bit and changed it to:
> >>
> >> (eval-after-load 'ffap
> >> '(add-to-list 'ffap-alist (cons +my-ffap-regexp+ #'my-ffap-hook)))
> >>
> >> Now, however, as soon as the ffap command is activated, I get an error:
> >>
> >> Lisp error: (void-variable ffap-alist)
> >>
> >> Somehow, using eval-after-load is causing the variable ffap-alist to be
> >> unbound, or not bound in the first place. Does anyone have any idea
> >> what's going on?
> >
> > 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
>
> Does it? If we're talking about ffap.el distributed with Emacs, I only
> see the `provide' from at the end of the file. And according to
> `vc-annotate', it's been there for a few years now.
I'm still running Emacs 22.2, it's the first non-comment in the file.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
- 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, 2013/01/17
- 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 <=
- 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