help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elint false positive error reporting on sort call?


From: tpeplt
Subject: Re: elint false positive error reporting on sort call?
Date: Tue, 10 Jun 2025 12:56:48 -0400

Pierre Rouleau <prouleau001@gmail.com> writes:

> Hi all,
>
> On Emacs 30.1, elint reports an error on code that seems valid to me.
>
> For instance, the last lines of lisp/buff-menu.el code (with line number
> prefixed) is:
>
>  898 (defun Buffer-menu-group-sort-alphabetically (groups _level)
>  899   (sort groups :in-place t :key #'car))
>  900
>  901 ;;; buff-menu.el ends here
>
> elint reports the following error on it:
>
> In function Buffer-menu-group-sort-alphabetically:
> buff-menu.el.gz:898:Error: Wrong number of args: (sort groups :in-place t
> :key #'car), (SEQ &key KEY LESSP REVERSE IN-PLACE)
>

It looks like an error in elint’s reporting.  The compiler,
appropriately, does not report this call to SORT as an error.

Here is a related error I reported, where elint reported an
error that was not an error:

https://lists.gnu.org/archive/html/bug-gnu-emacs/2025-06/msg00151.html

In that case, elint could not see that SORT’s idiosyncratic
multiple signatures made the call valid.  As the *Help* text
for SORT says:

   "For compatibility, the calling convention (sort SEQ
    LESSP) can also be used;"

which elint cannot recognize.  Some of the respondents to
the bug report have suggested that elint be discontinued due
to its false positives.

(Note: The thread of that bug report has since veered off in
many unrelated directions.)

-- 
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]