From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text. Date: Mon, 12 Aug 2024 20:25:30 +0000 Message-ID: <875xs54hfs.fsf@protonmail.com> References: <172348795350.32518.12446342178583629988@vcs2.savannah.gnu.org> <20240812183913.D9F16C1CB06@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17330"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Aug 13 04:22:46 2024 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 1sdhBN-0004Nb-Qg for ged-emacs-devel@m.gmane-mx.org; Tue, 13 Aug 2024 04:22:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdhB2-0004Nv-BI; Mon, 12 Aug 2024 22:22:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdbbr-0004Ug-Hl for emacs-devel@gnu.org; Mon, 12 Aug 2024 16:25:43 -0400 Original-Received: from mail-40134.protonmail.ch ([185.70.40.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sdbbo-0006YR-5y; Mon, 12 Aug 2024 16:25:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1723494335; x=1723753535; bh=6HmFL/QlwQ6EkBWpqgqwf0p+DoiVLY94LtH0jeuBFF4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=gtFPuxwo/Hk7DhexduaseRTwCRKOnbGR3gERsyprHip6mQ+8yJOIhRAVwa59yUeFd rlEbJSKRdE2xaM//kDVDTNL56RV1+zl2XtKcyCNYB8PPRxwyCxnFFhelV7CE4Ha5FH IGk43pBJ0LGIFOx4twQKCO4PIhPug0F/T6z1LQFdh7PUeuhCw3zugtLkopAccqs2Mo WWhiiQTOYhz9oYPOofDTWDYvA4rNLczRjM18cbd6lh49NPstGb0kEChkt9xdashHm/ eqrpuIvLd++zYCniniq1tqJuDVDKx2E1MrLZYVD+RCdOLjBMhHXSX10/j7LonmZtib SwQ3+35oPO7Qw== In-Reply-To: <20240812183913.D9F16C1CB06@vcs2.savannah.gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: fe18e8bca1ac2678bee37108b96326ad642bf1a3 Received-SPF: pass client-ip=185.70.40.134; envelope-from=pipcet@protonmail.com; helo=mail-40134.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 12 Aug 2024 22:22:05 -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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322687 Archived-At: "Eli Zaretskii" writes: > branch: emacs-30 > commit b585826a65ebfb58d3fe4744f0f8f9b5f3fc08cc > Author: Eli Zaretskii > Commit: Eli Zaretskii > > ; * lisp/files.el (require-with-check): Fix doc string and error text= . > --- > lisp/files.el | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/lisp/files.el b/lisp/files.el > index 73ad85ce854..dc796fffaa1 100644 > --- a/lisp/files.el > +++ b/lisp/files.el > @@ -1258,11 +1258,11 @@ See `load-file' for a different interface to `loa= d'." > (defun require-with-check (feature &optional filename noerror) > "If FEATURE is not already loaded, load it from FILENAME. > This is like `require' except if FEATURE is already a member of the list > -`features=E2=80=99, then we check if this was provided by a different fi= le than the > -one that we would load now (presumably because `load-path' has been > -changed since the file was loaded). > -If it's the case, we either signal an error (the default), or forcibly r= eload > -the new file (if NOERROR is equal to `reload'), or otherwise emit a warn= ing." > +`features=E2=80=99, then check if it was provided by a different file th= an the > +one that is about to be loaded now (presumably because `load-path' has > +been changed since FILENAME was loaded). If that is the case, either > +signal an error (the default), or forcibly reload the new file (if > +NOERROR is equal to `reload'), or otherwise emit a warning." > (let ((lh load-history) > (res (require feature filename (if (eq noerror 'reload) nil noer= ror)))) > ;; If the `feature' was not yet provided, `require' just loaded the = right > @@ -1275,7 +1275,7 @@ the new file (if NOERROR is equal to `reload'), or = otherwise emit a warning." > ((assoc fn load-history) nil) ;We loaded the right file. > ((eq noerror 'reload) (load fn nil 'nomessage)) > (t (funcall (if noerror #'warn #'error) > - "Feature provided by other file: %S" feature))))) > + "Feature `%S' is now provided by a different file %= s" fn))))) That doesn't look right to me. Indeed, (require-with-check 'nonexistent "nonexistent.el" t) now throws a "Not enough arguments for format string" error (fn is nil at that point). Pip