help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

eval-after-load confusion


From: Eric Abrahamsen
Subject: eval-after-load confusion
Date: Wed, 30 Apr 2014 16:36:50 +0800
User-agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3 (gnu/linux)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]