Function: use-package-process-keywords

use-package-process-keywords is a byte-compiled function defined in use-package-core.el.gz.

Signature

(use-package-process-keywords NAME PLIST &optional STATE)

Documentation

Process the next keyword in the free-form property list PLIST.

The values in the PLIST have each been normalized by the function use-package-normalize/KEYWORD (minus the colon).

STATE is a property list that the function may modify and/or query. This is useful if a package defines multiple keywords and wishes them to have some kind of stateful interaction.

Unless the KEYWORD being processed intends to ignore remaining keywords, it must call this function recursively, passing in the plist with its keyword and argument removed, and passing in the next value for the STATE.

Source Code

;; Defined in /usr/src/emacs/lisp/use-package/use-package-core.el.gz
(defun use-package-process-keywords (name plist &optional state)
  "Process the next keyword in the free-form property list PLIST.
The values in the PLIST have each been normalized by the function
use-package-normalize/KEYWORD (minus the colon).

STATE is a property list that the function may modify and/or
query.  This is useful if a package defines multiple keywords and
wishes them to have some kind of stateful interaction.

Unless the KEYWORD being processed intends to ignore remaining
keywords, it must call this function recursively, passing in the
plist with its keyword and argument removed, and passing in the
next value for the STATE."
  (declare (indent 1))
  (unless (null plist)
    (let* ((keyword (car plist))
           (arg (cadr plist))
           (rest (cddr plist)))
      (unless (keywordp keyword)
        (use-package-error (format "%s is not a keyword" keyword)))
      (let* ((handler (concat "use-package-handler/" (symbol-name keyword)))
             (handler-sym (intern handler)))
        (if (functionp handler-sym)
            (funcall handler-sym name keyword arg rest state)
          (use-package-error
           (format "Keyword handler not defined: %s" handler)))))))