1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Only printing debug messages if use-package-verbose is `debug'

Fixes https://github.com/jwiegley/use-package/issues/271
This commit is contained in:
John Wiegley 2016-02-26 16:14:51 -08:00
parent 8e128b29f5
commit f150691c78

View file

@ -58,7 +58,8 @@ If you customize this, then you should require the `use-package'
feature in files that use `use-package', even if these files only feature in files that use `use-package', even if these files only
contain compiled expansions of the macros. If you don't do so, contain compiled expansions of the macros. If you don't do so,
then the expanded macros do their job silently." then the expanded macros do their job silently."
:type 'boolean :type '(choice (const :tag "Quiet" nil) (const :tag "Verbose" t)
(const :tag "Debug" debug))
:group 'use-package) :group 'use-package)
(defcustom use-package-debug nil (defcustom use-package-debug nil
@ -1136,7 +1137,7 @@ this file. Usage:
(plist-get args* :defines)) (plist-get args* :defines))
(with-demoted-errors (with-demoted-errors
,(format "Cannot load %s: %%S" name) ,(format "Cannot load %s: %%S" name)
,(if use-package-verbose ,(if (eq use-package-verbose 'debug)
`(message "Compiling package %s" ',name-symbol)) `(message "Compiling package %s" ',name-symbol))
,(unless (plist-get args* :no-require) ,(unless (plist-get args* :no-require)
(use-package-load-name name))))))) (use-package-load-name name)))))))