From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: eval-after-load confusion Date: Wed, 30 Apr 2014 16:36:50 +0800 Message-ID: <87k3a7i57h.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398846866 17523 80.91.229.3 (30 Apr 2014 08:34:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2014 08:34:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 30 10:34:19 2014 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 1WfPy5-0006Co-W9 for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2014 10:34:18 +0200 Original-Received: from localhost ([::1]:55369 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfPy5-0001cK-JZ for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2014 04:34:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfPxn-0001b9-3q for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 04:34:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfPxf-0004Hc-Kg for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 04:33:59 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:53379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfPxf-0004HV-Ee for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 04:33:51 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WfPxX-0005aZ-RX for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 10:33:43 +0200 Original-Received: from 123.122.33.182 ([123.122.33.182]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Apr 2014 10:33:43 +0200 Original-Received: from eric by 123.122.33.182 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Apr 2014 10:33:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 30 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 123.122.33.182 User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:XkkpNS7a4FDixrm/xI6adDEV2nw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:97465 Archived-At: I have the following in a library that is required at startup: ;; (eval-after-load 'message ;; (let ((ign-headers-list ;; (split-string message-ignored-mail-headers ;; "|")) ;; (our-val (concat gnorb-mail-header "\\"))) ;; (unless (member our-val ign-headers-list) ;; (setq ign-headers-list ;; `(,@(butlast ign-headers-list 1) ,our-val ;; ,@(last ign-headers-list 1))) ;; (setq message-ignored-mail-headers ;; (mapconcat ;; 'identity ign-headers-list "|"))))) If I leave this block uncommented, I get a "void variable" error on startup, referencing 'message-ignored-mail-headers. I thought the whole point of `eval-after-load' was to avoid this: the block should only be run *after* message.el is loaded, and 'message-ignored-mail-headers is defined. I've also tried with "message" as a string, though that shouldn't matter. Is it because it's referenced inside a `let' form? What am I not understanding?! emacs-version -> "24.3.1" Thanks, Eric