all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Barry Margolin <barmar@alum.mit.edu>
Cc: help-gnu-emacs@gnu.org
Subject: Re: eval-after-load causes void-variable error
Date: Fri, 18 Jan 2013 07:21:52 +0400	[thread overview]
Message-ID: <87ehhjrx9r.fsf@yandex.ru> (raw)
In-Reply-To: <barmar-EFE6FE.19070017012013@news.eternal-september.org> (Barry Margolin's message of "Thu, 17 Jan 2013 19:07:00 -0500")

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.



  parent reply	other threads:[~2013-01-18  3:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-17 23:53 eval-after-load causes void-variable error Sean McAfee
2013-01-18  0:07 ` Barry Margolin
2013-01-18  1:35   ` Le Wang
2013-01-18  3:21   ` Dmitry Gutov [this message]
     [not found]   ` <mailman.17773.1358479324.855.help-gnu-emacs@gnu.org>
2013-01-18  5:15     ` Barry Margolin
2013-01-18  7:19       ` Dmitry Gutov
     [not found]       ` <mailman.17789.1358493580.855.help-gnu-emacs@gnu.org>
2013-01-18 17:57         ` Sean McAfee
2013-01-18 18:08           ` Barry Margolin
2013-01-18 19:04             ` Eli Zaretskii
     [not found]             ` <mailman.17839.1358535836.855.help-gnu-emacs@gnu.org>
2013-01-18 19:17               ` Barry Margolin
2013-01-18 18:34           ` Dmitry Gutov
2013-01-18 18:00         ` Barry Margolin

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehhjrx9r.fsf@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=barmar@alum.mit.edu \
    --cc=help-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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.