Function: use-package-as-one

use-package-as-one is a byte-compiled function defined in use-package-core.el.gz.

Signature

(use-package-as-one LABEL ARGS F &optional ALLOW-EMPTY)

Documentation

Call F on the first element of ARGS if it has one element, or all of ARGS.

If ALLOW-EMPTY is non-nil, it's OK for ARGS to be an empty list.

Source Code

;; Defined in /usr/src/emacs/lisp/use-package/use-package-core.el.gz
(defun use-package-as-one (label args f &optional allow-empty)
  "Call F on the first element of ARGS if it has one element, or all of ARGS.
If ALLOW-EMPTY is non-nil, it's OK for ARGS to be an empty list."
  (declare (indent 1))
  (if (if args
          (and (listp args) (listp (cdr args)))
        allow-empty)
      (if (= (length args) 1)
          (funcall f label (car args))
        (funcall f label args))
    (use-package-error
     (concat label " wants a non-empty list"))))