Improve use-package error message on wrong type
* lisp/use-package/use-package-core.el (use-package): Improve error message when passed the wrong type. (Bug#72160)
This commit is contained in:
parent
be8a7c9c88
commit
38782e684b
1 changed files with 9 additions and 0 deletions
|
@ -1893,6 +1893,15 @@ Usage:
|
|||
:vc Install the package directly from a version control system
|
||||
(using `package-vc.el')."
|
||||
(declare (indent defun))
|
||||
(when (stringp name)
|
||||
(user-error "String where there should be a symbol. \
|
||||
Try this instead: `(use-package %s ...)'"
|
||||
name))
|
||||
(when (and (consp name) (eq (car name) 'quote))
|
||||
(user-error "Quoted symbol where it should be unquoted. \
|
||||
Try this instead: `(use-package %s ...)'"
|
||||
(symbol-name (cadr name))))
|
||||
(cl-check-type name symbol)
|
||||
(unless (memq :disabled args)
|
||||
(macroexp-progn
|
||||
(use-package-concat
|
||||
|
|
Loading…
Add table
Reference in a new issue