Subject: 26.0.50; Elint reports false 'undefined function' errors

From: Tino Calancha <[email-masked]>
Date: Sat, 20 May 2017 22:08:05 +0900

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