Function: use-package-only-one

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

Signature

(use-package-only-one LABEL ARGS F)

Documentation

Call F on the first member of ARGS if it has exactly one element.

Source Code

;; Defined in /usr/src/emacs/lisp/use-package/use-package-core.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Argument Processing
;;

(defun use-package-only-one (label args f)
  "Call F on the first member of ARGS if it has exactly one element."
  (declare (indent 1))
  (cond
   ((and (listp args) (listp (cdr args))
         (= (length args) 1))
    (funcall f label (car args)))
   (t
    (use-package-error
     (concat label " wants exactly one argument")))))