Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

eval-after-load confusion

$
0
0
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

Viewing all articles
Browse latest Browse all 6551

Trending Articles