|
|
|
@ -112,6 +112,13 @@ otherwise requested."
|
|
|
|
|
:type '(repeat symbol)
|
|
|
|
|
:group 'use-package)
|
|
|
|
|
|
|
|
|
|
(defcustom use-package-ignore-unknown-keywords nil
|
|
|
|
|
"If non-nil, issue warning instead of error when unknown
|
|
|
|
|
keyword is encountered. The unknown keyword and its associated
|
|
|
|
|
arguments will be ignored in the `use-package' expansion."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'use-package)
|
|
|
|
|
|
|
|
|
|
(defcustom use-package-verbose nil
|
|
|
|
|
"Whether to report about loading and configuration details.
|
|
|
|
|
If you customize this, then you should require the `use-package'
|
|
|
|
@ -504,7 +511,8 @@ This is in contrast to merely setting it to 0."
|
|
|
|
|
"Given a pseudo-plist, normalize it to a regular plist.
|
|
|
|
|
The normalized key/value pairs from input are added to PLIST,
|
|
|
|
|
extending any keys already present."
|
|
|
|
|
(when input
|
|
|
|
|
(if (null input)
|
|
|
|
|
plist
|
|
|
|
|
(let* ((keyword (car input))
|
|
|
|
|
(xs (use-package-split-list #'keywordp (cdr input)))
|
|
|
|
|
(args (car xs))
|
|
|
|
@ -513,7 +521,8 @@ extending any keys already present."
|
|
|
|
|
(intern-soft (concat "use-package-normalize/"
|
|
|
|
|
(symbol-name keyword))))
|
|
|
|
|
(arg (and (functionp normalizer)
|
|
|
|
|
(funcall normalizer name keyword args))))
|
|
|
|
|
(funcall normalizer name keyword args)))
|
|
|
|
|
(error-string (format "Unrecognized keyword: %s" keyword)))
|
|
|
|
|
(if (memq keyword use-package-keywords)
|
|
|
|
|
(progn
|
|
|
|
|
(setq plist (use-package-normalize-plist
|
|
|
|
@ -523,7 +532,12 @@ extending any keys already present."
|
|
|
|
|
(funcall merge-function keyword arg
|
|
|
|
|
(plist-get plist keyword))
|
|
|
|
|
arg)))
|
|
|
|
|
(use-package-error (format "Unrecognized keyword: %s" keyword))))))
|
|
|
|
|
(if use-package-ignore-unknown-keywords
|
|
|
|
|
(progn
|
|
|
|
|
(display-warning 'use-package error-string)
|
|
|
|
|
(use-package-normalize-plist
|
|
|
|
|
name tail plist merge-function))
|
|
|
|
|
(use-package-error error-string))))))
|
|
|
|
|
|
|
|
|
|
(defun use-package-unalias-keywords (name args)
|
|
|
|
|
(setq args (cl-nsubstitute :if :when args))
|
|
|
|
@ -559,6 +573,15 @@ extending any keys already present."
|
|
|
|
|
(let* ((name-symbol (if (stringp name) (intern name) name))
|
|
|
|
|
(name-string (symbol-name name-symbol)))
|
|
|
|
|
|
|
|
|
|
;; The function `elisp--local-variables' inserts this unbound variable into
|
|
|
|
|
;; macro forms to determine the locally bound variables for
|
|
|
|
|
;; `elisp-completion-at-point'. It ends up throwing a lot of errors since it
|
|
|
|
|
;; can occupy the position of a keyword (or look like a second argument to a
|
|
|
|
|
;; keyword that takes one). Deleting it when it's at the top level should be
|
|
|
|
|
;; harmless since there should be no locally bound variables to discover
|
|
|
|
|
;; here anyway.
|
|
|
|
|
(setq args (delq 'elisp--witness--lisp args))
|
|
|
|
|
|
|
|
|
|
;; Reduce the set of keywords down to its most fundamental expression.
|
|
|
|
|
(setq args (use-package-unalias-keywords name-symbol args))
|
|
|
|
|
|
|
|
|
@ -972,6 +995,9 @@ meaning:
|
|
|
|
|
(float-time (gethash :preface-secs hash 0))
|
|
|
|
|
(float-time (gethash :use-package-secs hash 0))))))
|
|
|
|
|
use-package-statistics)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(orgtbl-mode)
|
|
|
|
|
(org-table-align)
|
|
|
|
|
(display-buffer (current-buffer))))
|
|
|
|
|
|
|
|
|
|
(defun use-package-statistics-gather (keyword name after)
|
|
|
|
@ -1351,7 +1377,7 @@ no keyword implies `:all'."
|
|
|
|
|
(spec (nth 1 def)))
|
|
|
|
|
(when (or (not face)
|
|
|
|
|
(not spec)
|
|
|
|
|
(> (length arg) 2))
|
|
|
|
|
(> (length def) 2))
|
|
|
|
|
(use-package-error error-msg))))))
|
|
|
|
|
|
|
|
|
|
(defun use-package-handler/:custom-face (name keyword args rest state)
|
|
|
|
@ -1510,10 +1536,11 @@ this file. Usage:
|
|
|
|
|
(condition-case-unless-debug err
|
|
|
|
|
(use-package-core name args)
|
|
|
|
|
(error
|
|
|
|
|
(display-warning
|
|
|
|
|
'use-package
|
|
|
|
|
(format "Failed to parse package %s: %s"
|
|
|
|
|
name (error-message-string err)) :error))))
|
|
|
|
|
(ignore
|
|
|
|
|
(display-warning
|
|
|
|
|
'use-package
|
|
|
|
|
(format "Failed to parse package %s: %s"
|
|
|
|
|
name (error-message-string err)) :error)))))
|
|
|
|
|
(when use-package-compute-statistics
|
|
|
|
|
`((use-package-statistics-gather :use-package ',name t)))))))
|
|
|
|
|
|