]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/package.el (package-activate-all): Fix second-order warning
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 5 Dec 2023 20:02:24 +0000 (15:02 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 5 Dec 2023 20:02:24 +0000 (15:02 -0500)
lisp/emacs-lisp/package.el

index 0a87f771ab9c1f5d0fc7962a989d99d1e33d8830..bed6e74c921e0b52f3376b9f2ff897b1b71e6dc8 100644 (file)
@@ -1732,8 +1732,13 @@ The variable `package-load-list' controls which packages to load."
                  t)))
         (progn
           (require 'package)
-          (declare-function package--activate-all "package" ())
-          (package--activate-all))))))
+          ;; Silence the "unknown function" warning when this is compiled
+          ;; inside `loaddefs.el'.
+          ;; FIXME: We use `with-no-warnings' because the effect of
+          ;; `declare-function' is currently not scoped, so if we use
+          ;; it here, we end up with a redefinition warning instead :-)
+          (with-no-warnings
+            (package--activate-all)))))))
 
 (defun package--activate-all ()
   (dolist (elt (package--alist))