[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs Lisp Linter fail to identify function defined in a "use-packag
From: |
Emanuel Berg |
Subject: |
Re: Emacs Lisp Linter fail to identify function defined in a "use-packag |
Date: |
Thu, 12 Oct 2023 02:29:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Kiong-Gē Liāu wrote:
> I did some further test and found that the "function *** is
> not known to be defined" error only happen once for either
> a undefined function or a function defined in a nested
> structure, as seen in the attached screenshot.
I love the enthusiasm but I think one should just byte-compile
Elisp and use that as the de facto linter, then get away with
the warnings as a way of improving the quality of the code,
and thus have better as well as faster code as a result.
If one needs/wants faster code still go
--with-native-compilation=aot. Building Emacs like that takes
some time but after that it is super fast and the little
disruption that happened with the on-the-fly/just-in-time
native compilation also don't occur.
The only thing I wonder about is, if one does that, when
byte-compiling one's own Elisp, maybe one has to explicitely
native-compile it as well? If so, it can be done like this,
for each .elc file.
$(emacs) -Q \
--batch \
--eval "(setq load-path (append load-path '($(packs)))))" \
--eval "(native-compile \"$<\")"
--
underground experts united
https://dataswamp.org/~incal