Flycheck has a brilliant ability to warn about when I'm using a function foo-bar
but have forgotten to add (require 'foo)
at the top of my file.
However, it's inconsistent. It doesn't always warn for functions from some packages, even if the function is not autoloaded. How can I make Emacs warn me about these?
;; This produces a warning
;; "the function `which-function' is not known to be defined."
(defun which-func-not-required ()
(which-function))
;; This produces no warning.
(defun cl-not-required (x)
(cl-copy-list x))
;; This produces no warning either.
(defun byte-comp-not-required (f)
(byte-compile-top-level f))
;; end
(inspired by this PR)