From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.help Subject: Re: eval-after-load confusion Date: Wed, 30 Apr 2014 11:18:05 +0200 Message-ID: <87d2fzxjjm.fsf@geodiff-mac3.ulb.ac.be> References: <87k3a7i57h.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1398849560 24970 80.91.229.3 (30 Apr 2014 09:19:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2014 09:19:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eric Abrahamsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 30 11:19:12 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 1WfQfX-0005kg-Nq for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2014 11:19:11 +0200 Original-Received: from localhost ([::1]:55524 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfQfX-0004IO-AS for geh-help-gnu-emacs@m.gmane.org; Wed, 30 Apr 2014 05:19:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfQfG-0004IC-Ie for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 05:19:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfQfA-0003D0-DG for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 05:18:54 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:18961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfQfA-0003Cs-79 for help-gnu-emacs@gnu.org; Wed, 30 Apr 2014 05:18:48 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EAF+/YFOkD4Xx/2dsb2JhbABQCchpgTp0giYBBXkQCyElDwEESROILAEUpwCbXgGHMheHVIYiCgEBTweEOQEDn26MH4MzO4E1 Original-Received: from mathsrv4.ulb.ac.be (HELO geodiff-mac3.ulb.ac.be) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 30 Apr 2014 11:17:19 +0200 In-Reply-To: <87k3a7i57h.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 30 Apr 2014 16:36:50 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.90 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 164.15.128.112 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:97466 Archived-At: Eric Abrahamsen writes: > ;; (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. eval-after-load is a (normal) function, which means that each of its argument is evaluated first, then eval-after-load is called with those values. Adding a single quote before the (let ...) form should help. -- Nico.