emacs-devel
[Top][All Lists]
Advanced

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

`declare-function' not needed anymore? (was: Re: lexical/static let-clos


From: Emanuel Berg
Subject: `declare-function' not needed anymore? (was: Re: lexical/static let-closure now reachable from interactive spec!)
Date: Tue, 27 Sep 2022 23:38:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> (require 'cl-lib)
>
> (let ((min-def 0)
>       (max-def 9)
>       (inc-def 1) )
>   (defun interval (&optional min max inc)
>     (interactive (list (read-number "min: " min-def)
>                        (read-number "max: " max-def)
>                        (read-number "inc: " inc-def)) )
>     (or min (setq min min-def))
>     (or max (setq max max-def))
>     (or inc (setq inc inc-def))
>     (unless (<= min max)
>       (error "Bogus interval") )
>     (unless (> inc 0)
>       (error "Bogus increment") )
>     (cl-loop for i from min to max by inc collect i) )
>   (declare-function interval nil) )

I think that `declare-function' is also not needed anymore?

It's there to shut the byte-compiler up that the function
isn't known to be defined, but now it doesn't say that so the
ugly `declare-function' (even more so with the trailing nil)
can be removed ...

Only 33 places to do that for me ...

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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