mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 15:00:45 -08:00
Don't allow :commands, :bind, etc., to be given an empty list
This makes the following an error:
:commands
:commands nil
:commands ()
Fixes https://github.com/jwiegley/use-package/issues/512
This commit is contained in:
parent
4ddf42185a
commit
18b9bf18ad
1 changed files with 2 additions and 2 deletions
|
|
@ -828,12 +828,12 @@ If the package is installed, its entry is removed from
|
|||
(defun use-package-as-one (label args f)
|
||||
"Call F on the first element of ARGS if it has one element, or all of ARGS."
|
||||
(declare (indent 1))
|
||||
(if (and (listp args) (listp (cdr args)))
|
||||
(if (and (not (null args)) (listp args) (listp (cdr args)))
|
||||
(if (= (length args) 1)
|
||||
(funcall f label (car args))
|
||||
(funcall f label args))
|
||||
(use-package-error
|
||||
(concat label " wants a list"))))
|
||||
(concat label " wants a non-empty list"))))
|
||||
|
||||
(put 'use-package-as-one 'lisp-indent-function 'defun)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue