From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: eval-after-load causes void-variable error Date: Fri, 18 Jan 2013 00:15:59 -0500 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1358486415 32287 80.91.229.3 (18 Jan 2013 05:20:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jan 2013 05:20:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 18 06:20:34 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tw4NT-0003UU-SE for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Jan 2013 06:20:32 +0100 Original-Received: from localhost ([::1]:36122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tw4NA-0004OT-9K for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Jan 2013 00:20:12 -0500 Original-Path: usenet.stanford.edu!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 44 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="2080"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Nri6vKfUALQ3czkKNRf8L" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:TlEihITZX9ygbJ0Ad4zHGktXey8= Original-Xref: usenet.stanford.edu gnu.emacs.help:196407 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88702 Archived-At: In article , Dmitry Gutov wrote: > 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. 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 ***