2

when running Flymake against ~/.emacs, I see errors complaining about missing files like "powerline" and "company" - i.e. stuff contained in load-path. How can I configure Flymake's elisp backend to be aware of load-path? Nothing in the Flymake customize-group looked applicable.

This is with Emacs 27.0.50 .

1
  • This will not answer your question, but in case you were using Flycheck, this would be fixable by setting flycheck-emacs-lisp-load-path Sep 25, 2019 at 12:57

2 Answers 2

0

There is elisp-flymake-byte-compile-load-path. Setting it to load-path last in your init file seems to be a quick-fix.

(setq elisp-flymake-byte-compile-load-path load-path)
0

An alternative to the answer provided by Anders Johansson—useful in case one is changing load-path after the init file has been loaded—is to add advice around elisp-flymake-byte-compile:

(defun my-elisp-flymake-byte-compile (old-function &rest arguments)
  ;; checkdoc-params: (old-function arguments)
  "Wrapper for `elisp-flymake-byte-compile'."
  (let ((elisp-flymake-byte-compile-load-path (append elisp-flymake-byte-compile-load-path load-path)))
    (apply old-function arguments)))

(advice-add 'elisp-flymake-byte-compile :around #'my-elisp-flymake-byte-compile)

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.