From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.devel 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 Message-ID: <878rm47b2a.fsf@dataswamp.org> References: <87wn9ojznh.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24152"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) To: emacs-devel@gnu.org Cancel-Lock: sha1:mR6gwua0qox6A0LUTgNgLAAMGXg= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Sep 28 04:25:14 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1odMl8-00066u-Fn for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Sep 2022 04:25:14 +0200 Original-Received: from localhost ([::1]:56990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odMl7-0003R5-Jf for ged-emacs-devel@m.gmane-mx.org; Tue, 27 Sep 2022 22:25:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37652) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odIHP-0008By-WB for emacs-devel@gnu.org; Tue, 27 Sep 2022 17:38:16 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:38516) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odIHO-0007Hs-D9 for emacs-devel@gnu.org; Tue, 27 Sep 2022 17:38:15 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1odIHM-0003za-Dr for emacs-devel@gnu.org; Tue, 27 Sep 2022 23:38:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: <87wn9ojznh.fsf@dataswamp.org> (Emanuel Berg's message of "Tue, 27 Sep 2022 23:06:10 +0200") Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, PLING_QUERY=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 27 Sep 2022 22:24:29 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296381 Archived-At: > (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