From a214fd300307732d188432193ed7e7350338b4ec Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 12 Aug 2024 21:38:46 +0300 Subject: [PATCH] ; * lisp/files.el (require-with-check): Fix doc string and error text. (cherry picked from commit b585826a65ebfb58d3fe4744f0f8f9b5f3fc08cc) --- lisp/files.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index ab9babbd43f..1fca39f7b70 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1270,11 +1270,11 @@ See `load-file' for a different interface to `load'." (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’, then we check if this was provided by a different file 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 reload -the new file (if NOERROR is equal to `reload'), or otherwise emit a warning." +`features’, then check if it was provided by a different file than 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 noerror)))) ;; If the `feature' was not yet provided, `require' just loaded the right @@ -1287,7 +1287,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))))) res)) (defun file-remote-p (file &optional identification connected) -- 2.39.2