[Top][All Lists]

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

Re: eval-after-load causes void-variable error

From: Dmitry Gutov
Subject: Re: eval-after-load causes void-variable error
Date: Fri, 18 Jan 2013 07:21:52 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)

Barry Margolin <> writes:

> In article <>,
>  Sean McAfee <> 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.

reply via email to

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