Function: use-package-normalize/:ensure

use-package-normalize/:ensure is an autoloaded and byte-compiled function defined in use-package-ensure.el.gz.

Signature

(use-package-normalize/:ensure NAME KEYWORD ARGS)

Source Code

;; Defined in /usr/src/emacs/lisp/use-package/use-package-ensure.el.gz
;;;###autoload
(defun use-package-normalize/:ensure (_name keyword args)
  (if (null args)
      (list t)
    (use-package-only-one (symbol-name keyword) args
      #'(lambda (_label arg)
          (cond
           ((symbolp arg)
            (list arg))
           ((and (listp arg) (= 3 (length arg))
                 (symbolp (nth 0 arg))
                 (eq :pin (nth 1 arg))
                 (or (stringp (nth 2 arg))
                     (symbolp (nth 2 arg))))
            (list (cons (nth 0 arg) (nth 2 arg))))
           (t
            (use-package-error
             (concat ":ensure wants an optional package name "
                     "(an unquoted symbol name), or (<symbol> :pin <string>)"))))))))