[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to deal with 'function' not known to be defined
From: |
Stefan Monnier |
Subject: |
Re: How to deal with 'function' not known to be defined |
Date: |
Thu, 01 Oct 2020 14:28:57 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> I have a lisp file `init-which-key.el` which is included in
> `~/.emacs.d/init.el`.
[...]
> Flymake reports one warning - "The function 'which-key-mode" is not
> known to be define.
The linters activated in `emacs-lisp-mode` for `flymake` are inadequate
for the kind of code you find in `~/.emacs.d/init.el`.
They're designed for the kind of code you'd find in a package, like
those you can find in ELPA.
If you really want, you can try and write your `init.el` code in a way
that will silence those warnings, but it'll be inconvenient and the
benefits will be very slim and it could even be harmful (typically to
the startup time).
Making a linter that only emits those warnings when they're really
relevant in such a file will/would take a fair bit more effort. In the
mean time I'd suggest you disable that linter in that file or ignore
those warnings.
Stefan