unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Emacs Lisp Linter fail to identify function defined in a "use-package" block
@ 2023-10-12  0:32 Kiong-Gē Liāu
  2023-10-12  5:22 ` Emanuel Berg
  0 siblings, 1 reply; 16+ messages in thread
From: Kiong-Gē Liāu @ 2023-10-12  0:32 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

Hi,

I just realized that it's caused by flyCheck rather than elint. Sorry for
some misleading information.


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. We may need to add some supplemental
information to elint to avoid false-alarms about undefined functions or
variables.

Thanks,
Kiong-Gē.

[-- Attachment #2: Type: text/html, Size: 775 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Emacs Lisp Linter fail to identify function defined in a "use-package" block
@ 2023-10-11 17:19 Kiong-Gē Liāu
  0 siblings, 0 replies; 16+ messages in thread
From: Kiong-Gē Liāu @ 2023-10-11 17:19 UTC (permalink / raw)
  To: incal, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

Hi Emanuel,

I did some further tests 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.

1. The kkl0-fun, which is defined at top-level, linter shows no error
   at all about it
2. The kkl1-fun is defined as long as the *kk0l* global variable 
   is assigned as t
3. The first linter error appears when the kkl1-fun is called first
   time
4. At the second call-site of kkl1-fun, the linter "undefined-unction"
   error disappears 
5. the kkl2-fun is totally undefined, and linter identifies the
   undefined function error at its first call-site
6. at the second call-site of kkl2-fun, the undefined-function linter
   error disappears as well

So, it seems that elint starts to ignore undefined function starting
second call-site regardless that function is defined or not. we need
some further investigation on elint.el's elint-update-env function and
related functions.

Thanks,
Kiong-Gē.

[-- Attachment #2: Screenshot from 2023-10-11 08-56-48.png --]
[-- Type: image/png, Size: 49918 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Emacs Lisp Linter fail to identify function defined in a "use-package" block
@ 2023-10-10 14:51 Kiong-Gē Liāu
  2023-10-10 22:25 ` Emanuel Berg
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Kiong-Gē Liāu @ 2023-10-10 14:51 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

Hi, 

  I found that the built-in Emacs lisp linter seems not able to
identify functions defined within a (even the same) use-package :config
block as the attached screenshot indicates: the "elisp-face-temp"
function is defined right above the "elisp-face" function, however, the
linter says that the "`elisp-face-temp' is not known to be defined".
Are there some further configurations required in order to make the
linter identifies functions defined in nested structure or we need to
change the linter's implementation code to make  the linter to identify
functions those are not defined at top-level (i.e., defun block within
a use-package or with-eval-after-loan block)

Thanks, 
Kiong-Gē. 

[-- Attachment #2: Screenshot from 2023-10-10 09-37-53.png --]
[-- Type: image/png, Size: 284855 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-11-08  8:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-12  0:32 Emacs Lisp Linter fail to identify function defined in a "use-package" block Kiong-Gē Liāu
2023-10-12  5:22 ` Emanuel Berg
2023-10-13  1:47   ` Emanuel Berg
2023-10-13  1:55   ` Emanuel Berg
2023-10-13  2:05   ` Emanuel Berg
2023-10-13  2:29   ` Emanuel Berg
2023-10-13  3:33   ` Emanuel Berg
2023-10-26 20:29     ` Emanuel Berg
2023-11-06 23:51       ` Emanuel Berg
2023-11-08  3:10         ` Richard Stallman
2023-11-08  8:56           ` Emanuel Berg
  -- strict thread matches above, loose matches on Subject: below --
2023-10-11 17:19 Kiong-Gē Liāu
2023-10-10 14:51 Kiong-Gē Liāu
2023-10-10 22:25 ` Emanuel Berg
2023-10-11  0:59 ` Emanuel Berg
2023-10-11  1:43 ` Emanuel Berg

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).