unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* eval-after-load confusion
@ 2014-04-30  8:36 Eric Abrahamsen
  2014-04-30  9:18 ` Nicolas Richard
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2014-04-30  8:36 UTC (permalink / raw)
  To: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-05-02  5:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30  8:36 eval-after-load confusion Eric Abrahamsen
2014-04-30  9:18 ` Nicolas Richard
2014-04-30  9:28   ` Eric Abrahamsen
2014-04-30  9:36 ` Thien-Thi Nguyen
2014-04-30  9:41   ` Eric Abrahamsen
2014-04-30 12:28 ` Stefan Monnier
2014-05-02  5:28   ` Eric Abrahamsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).