GNU bug report logs - #27006
26.0.50; Elint reports false 'undefined function' errors

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Sat, 20 May 2017 13:09:01 UTC

Severity: minor

Tags: fixed

Found in version 26.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27006 in the body.
You can then email your comments to 27006 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#27006; Package emacs. (Sat, 20 May 2017 13:09:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tino Calancha <tino.calancha <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 20 May 2017 13:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; Elint reports false 'undefined function' errors
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#27006; Package emacs. (Sat, 12 Dec 2020 13:16:02 GMT) Full text and rfc822 format available.

Message #8 received at 27006 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Tino Calancha <tino.calancha <at> gmail.com>
Cc: 27006 <at> debbugs.gnu.org
Subject: Re: bug#27006: 26.0.50; Elint reports false 'undefined function'
 errors
Date: Sat, 12 Dec 2020 14:14:57 +0100
Tino Calancha <tino.calancha <at> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 12 Dec 2020 13:16:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 27006 <at> debbugs.gnu.org and Tino Calancha <tino.calancha <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 12 Dec 2020 13:16:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 10 Jan 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.