From: John Wiegley Date: Wed, 25 Mar 2015 03:30:48 +0000 (-0500) Subject: Failed to require a package is just a message X-Git-Tag: emacs-29.0.90~1306^2~15^2~342 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c850481d069c0b799edb3039ec1950dc7c06125f;p=emacs.git Failed to require a package is just a message --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 82b782bfe09..0d6325c4f0f 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -671,7 +671,7 @@ function for a particular keymap. The keymap is expected to be defined by the package. In this way, loading the package is deferred until the prefix key sequence is pressed." (if (not (require package nil t)) - (error "Could not load package %s" package) + (use-package-error (format "Could not load package.el: %s" package)) (if (and (boundp keymap-symbol) (keymapp (symbol-value keymap-symbol))) (let ((key (key-description (this-command-keys-vector))) @@ -682,8 +682,9 @@ deferred until the prefix key sequence is pressed." (bind-key key keymap)) (setq unread-command-events (listify-key-sequence (this-command-keys-vector)))) - (error "use-package: package %s failed to define keymap %s" - package keymap-symbol)))) + (use-package-error + (format "use-package: package.el %s failed to define keymap %s" + package keymap-symbol))))) (defun use-package-handler/:bind-keymap (name-symbol keyword arg rest state &optional override) @@ -882,10 +883,7 @@ deferred until the prefix key sequence is pressed." config-body) `((if (not (require ',name-symbol nil t)) (ignore - (display-warning - 'use-package - (format "Could not load %s" ',name-symbol) - :error)) + (message (format "Could not load %s" ',name-symbol))) ,@config-body))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;