From: Noam Postavsky Date: Sat, 14 Mar 2015 15:33:12 +0000 (-0400) Subject: use-package-expand: use display-warning X-Git-Tag: emacs-29.0.90~1306^2~15^2~398^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=27cba067ee6c6aa93af4914d06db6e6ea876ed3d;p=emacs.git use-package-expand: use display-warning instead of with-demoted-errors. This prevents errors from getting lost in the *Messages* buffer. --- diff --git a/lisp/use-package/use-package.el b/lisp/use-package/use-package.el index 75d5ee6187c..0d295d192bb 100644 --- a/lisp/use-package/use-package.el +++ b/lisp/use-package/use-package.el @@ -282,9 +282,12 @@ then the expanded macros do their job silently." (defsubst use-package-expand (name label form) (declare (indent 1)) (and form - `(with-demoted-errors - ,(format "Failure in %s of %s: %%S" label name) - ,form))) + (let ((err (make-symbol "err")) + (fmt (format "Failure in %s of %s: %%S" label name))) + `(condition-case-unless-debug ,err + ,form + (error (display-warning 'use-package (format ,fmt ,err) :error) + nil))))) (defun use--package (name-symbol name-string args) "See docstring for `use-package'."