From 7f03ee8de15df31e57fd86e193901a1cf70cc49d Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 26 Apr 2021 18:40:09 -0400 Subject: * lisp/emacs-lisp/package.el: Fix use of `find-library-name` That function caused a warning for a good reason. Don't just declare it and hope it will be available. (package--list-of-conflicts): Require `find-func` explicitly before declaring the function. Also don't ignore all errors but only the `file-error`s which will be emitted by `find-library-name` in normal circumstances. * lisp/emacs-lisp/find-func.el (find-library-name): Signal a `file-error` Instead of a generic `error`. --- lisp/emacs-lisp/find-func.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/find-func.el') diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index a0d859b834d..58876a45e19 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -208,7 +208,7 @@ LIBRARY should be a string (the name of the library)." (or find-function-source-path load-path) load-file-rep-suffixes))))) (find-library--from-load-history library) - (error "Can't find library %s" library))) + (signal 'file-error (list "Can't find library" library)))) (defun find-library--from-load-history (library) ;; In `load-history', the file may be ".elc", ".el", ".el.gz", and -- cgit v1.2.3