all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#27006: 26.0.50; Elint reports false 'undefined function' errors
@ 2017-05-20 13:08 Tino Calancha
  2020-12-12 13:14 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Tino Calancha @ 2017-05-20 13:08 UTC (permalink / raw)
  To: 27006


Write a file /tmp/foo.el with contents:
--8<-----------------------------cut here---------------start------------->8---
(defun foo-find ()
  (require 'find-lisp)
  (find-lisp-find-files default-directory "\\`foo.*"))
--8<-----------------------------cut here---------------end--------------->8---

emacs -Q /tmp/foo.el

M-x elint-current-buffer RET
;; It shows:
foo-fail.el:1:Error: Call to undefined function: find-lisp-find-files

Same if you wrap `find-lisp-find-files' call inside
`with-no-warnings', even if you wrote before the function
definition:
(declare-function 'find-lisp-find-files "find-lisp" (directory regexp))

This is a false alarm: when `foo-find' is called `find-lisp-find-files' is
called right after
(require 'find-lisp)
so that it's already defined.
It would be good if elint is smarter so that it does not report these cases.


In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
Repository revision: 6c7bf039e9c2e6daf548a95204740eeaf4c61abd





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

* bug#27006: 26.0.50; Elint reports false 'undefined function' errors
  2017-05-20 13:08 bug#27006: 26.0.50; Elint reports false 'undefined function' errors Tino Calancha
@ 2020-12-12 13:14 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-12 13:14 UTC (permalink / raw)
  To: Tino Calancha; +Cc: 27006

Tino Calancha <tino.calancha@gmail.com> writes:

> Write a file /tmp/foo.el with contents:
>
> (defun foo-find ()
>   (require 'find-lisp)
>   (find-lisp-find-files default-directory "\\`foo.*"))
>
> emacs -Q /tmp/foo.el
>
> M-x elint-current-buffer RET
> ;; It shows:
> foo-fail.el:1:Error: Call to undefined function: find-lisp-find-files

I've now made elint in Emacs 28 load files that are `require'd, which
seems to fix this problem.  I've next to no experience using elint,
though, so somebody please let me know if the leads to any problems.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2020-12-12 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-20 13:08 bug#27006: 26.0.50; Elint reports false 'undefined function' errors Tino Calancha
2020-12-12 13:14 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.