[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-package" block |
Date: |
Thu, 12 Oct 2023 07:22:59 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Kiong-Gē Liāu wrote:
> I also noticed that elint is unable to identify
> variables/functions defined in subr.el, startup.el, or any
> other el files that has no explicit "provides" statement at
> their end.
Well, here the discussion can go both ways! Because in a way
it makes sense that every file `provide' its stuff, and every
other file that wants to use it `require' it.
Update 1, elint is correctly seeing defuns in lexical
let-closures, and there is no need to use `declare-function'
for it do that as was incorrectly theorized the day before.
This is interesting because the byte-compiler does not see
those so there declare-function is needed.
Update 2, elint cannot see variables in `pcase-let' when the
variables are defined using the `(,a ,b ,c) syntax - warning
BTW, if that looks like a list with a bunch of items
being evaluated, that isn't the case, here, it is a syntax
used for special purposes by pcase-let.
pcase-let was introduced in Emacs 28.1, probably elint has not
been brought up to date on it.
--
underground experts united
https://dataswamp.org/~incal