mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-29 07:58:28 +00:00
* lisp/files.el (require-with-check): Improve error messages.
This commit is contained in:
parent
9a04b99b3d
commit
45a78ec6c5
@ -1274,9 +1274,17 @@ NOERROR is equal to `reload'), or otherwise emit a warning."
|
|||||||
(cond
|
(cond
|
||||||
((assoc fn load-history) nil) ;We loaded the right file.
|
((assoc fn load-history) nil) ;We loaded the right file.
|
||||||
((eq noerror 'reload) (load fn nil 'nomessage))
|
((eq noerror 'reload) (load fn nil 'nomessage))
|
||||||
(t (funcall (if noerror #'warn #'error)
|
((and fn (memq feature features))
|
||||||
"Feature `%S' is now provided by a different file %s"
|
(funcall (if noerror #'warn #'error)
|
||||||
feature fn)))))
|
"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))
|
res))
|
||||||
|
|
||||||
(defun file-remote-p (file &optional identification connected)
|
(defun file-remote-p (file &optional identification connected)
|
||||||
|
Loading…
Reference in New Issue
Block a user