Error (use-package): w3m/:config: Symbol’s value as variable is void: w3m-filter-configuration

I have a use-package statement that was producing an error because apparently emacs-w3m doesn't configure its variables at the times other packages do. Anyway, my question is, why do I have to resort to setq-default here, when my reading of the use-package help is that the :defines keyword was made for precisely this use-case?

(use-package w3m
  :demand t
  :defines w3m-filter-configuration ;; doesn't seem to do any good
  (setq-default w3m-filter-configuration (list)) ;; why is this line needed despite :defines?
  (add-to-list 'w3m-filter-configuration '(t "Make page readable" ".*" tsa/readability)))
  • 1
    I think you need :config there not :custom. Jun 10, 2021 at 15:12
  • Thanks, @FranBurstall. It was a typo when I cut out the unnecessary parts of the real definition. Fixed now. Jun 10, 2021 at 19:45
  • Ok, thanks. Comments deleted and close-vote retracted.
    – phils
    Jun 16, 2021 at 22:06


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.