From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs-30 b585826a65e: ; * lisp/files.el (require-with-check): Fix doc string and error text. Date: Thu, 15 Aug 2024 19:24:17 +0300 Message-ID: <868qwx7o0e.fsf@gnu.org> References: <172348795350.32518.12446342178583629988@vcs2.savannah.gnu.org> <87jzgk2uzf.fsf@protonmail.com> <86y150fh7j.fsf@gnu.org> <87cymb3awv.fsf@protonmail.com> <86h6bnfvvx.fsf@gnu.org> <878qwz2nhi.fsf@protonmail.com> <86ikw388qw.fsf@gnu.org> <87zfpf12x6.fsf@protonmail.com> <86wmki6xwj.fsf@gnu.org> <87frr5227y.fsf@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23263"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Aug 15 18:24:36 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 1sedHA-0005v7-1M for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Aug 2024 18:24:36 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sedGy-0000rD-TA; Thu, 15 Aug 2024 12:24:25 -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 1sedGu-0000du-D1 for emacs-devel@gnu.org; Thu, 15 Aug 2024 12:24:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sedGt-0006RV-VX; Thu, 15 Aug 2024 12:24:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ArQ0tufz/pYgzruc4KIEMILuEVmqICUWldxv2dFhcbo=; b=IxCnDRy9Xp5l A+zRUfY4/jJDIyfwVuIcbK8kTfsAnaZNxrbVfm+K2TLowtQqBjHEkkxs7ZNmA2c/tfmLZZvO9o5Ed 1ZLIcNvutka3c8woOvnsuzeHbmHGUKIxK8vzPeAB4T7Kbd+9flCPrRVeNMv7mM5GGDwD+GFZJCYRV kdUwzuKZ0nDMlt+Bt+Ne8rCljr/rgIEOaSTmFS10lLhPdlcuaKMM1UXK4eHxjYIFddfcSU+mqCsys RSbgmbb8a+dIDX8nEBUQSFyADIeUbSbj8EJiTzDYAyivevhNSoW0aOi4Z1+MtqGfIjPkfBlEdHNOd unUCwZSqtOQa418QkRl91w==; In-Reply-To: <87frr5227y.fsf@protonmail.com> (message from Pip Cet on Thu, 15 Aug 2024 16:13:58 +0000) 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:322787 Archived-At: > Date: Thu, 15 Aug 2024 16:13:58 +0000 > From: Pip Cet > Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca > > >> diff --git a/lisp/files.el b/lisp/files.el > >> index eadb4a9d0b1..6cbb1b5c632 100644 > >> --- a/lisp/files.el > >> +++ b/lisp/files.el > >> @@ -1274,9 +1274,17 @@ require-with-check > >> (cond > >> ((assoc fn load-history) nil) ;We loaded the right file. > >> ((eq noerror 'reload) (load fn nil 'nomessage)) > >> - (t (funcall (if noerror #'warn #'error) > >> - "Feature `%S' is now provided by a different file %s" > >> - feature fn))))) > >> + ((and fn (memq feature features)) > >> + (funcall (if noerror #'warn #'error) > >> + "Feature `%S' is now provided by a different file %s" > >> + feature fn)) > >> + (fn > >> + (funcall (if noerror #'warn #'error) > >> + "Could not load file %s" fn)) > >> + (t > >> + (funcall (if noerror #'warn #'error) > >> + "Could not locate file %s in load path" > >> + (or filename (symbol-name feature))))))) > >> res)) > >> > >> (defun file-remote-p (file &optional identification connected) > > > > LGTM, thanks. > > Is this okay for emacs-30 or master? (I'd prefer just applying this to > master for now) Why not emacs-30? It just improves the error message text, that's all.