unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: 27006@debbugs.gnu.org
Subject: bug#27006: 26.0.50; Elint reports false 'undefined function' errors
Date: Sat, 20 May 2017 22:08:05 +0900	[thread overview]
Message-ID: <87o9un3ccq.fsf@calancha-pc> (raw)


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





             reply	other threads:[~2017-05-20 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-20 13:08 Tino Calancha [this message]
2020-12-12 13:14 ` bug#27006: 26.0.50; Elint reports false 'undefined function' errors Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9un3ccq.fsf@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=27006@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).