From: Emanuel Berg <incal@dataswamp.org>
To: emacs-devel@gnu.org
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 [thread overview]
Message-ID: <878rm47b2a.fsf@dataswamp.org> (raw)
In-Reply-To: <87wn9ojznh.fsf@dataswamp.org> (Emanuel Berg's message of "Tue, 27 Sep 2022 23:06:10 +0200")
> (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
next prev parent reply other threads:[~2022-09-27 21:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 21:06 lexical/static let-closure now reachable from interactive spec! Emanuel Berg
2022-09-27 21:38 ` Emanuel Berg [this message]
2022-09-28 11:23 ` `declare-function' not needed anymore? Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878rm47b2a.fsf@dataswamp.org \
--to=incal@dataswamp.org \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.