Function: use-package-handler/:custom

use-package-handler/:custom is a byte-compiled function defined in use-package-core.el.gz.

Signature

(use-package-handler/:custom NAME KEYWORD ARGS REST STATE)

Documentation

Generate use-package custom keyword code.

Source Code

;; Defined in /usr/src/emacs/lisp/use-package/use-package-core.el.gz
(defun use-package-handler/:custom (name _keyword args rest state)
  "Generate use-package custom keyword code."
  (use-package-concat
   (if (bound-and-true-p use-package-use-theme)
       `((let ((custom--inhibit-theme-enable nil))
           ;; Declare the theme here so use-package can be required inside
           ;; eval-and-compile without warnings about unknown theme.
           (unless (memq 'use-package custom-known-themes)
             (deftheme use-package)
             (enable-theme 'use-package)
             (setq custom-enabled-themes (remq 'use-package custom-enabled-themes)))
           (custom-theme-set-variables
            'use-package
            ,@(mapcar
               #'(lambda (def)
                   (let ((variable (nth 0 def))
                         (value (nth 1 def))
                         (comment (nth 2 def)))
                     (unless (and comment (stringp comment))
                       (setq comment (format "Customized with use-package %s" name)))
                     `'(,variable ,value nil () ,comment)))
               args))))
     (mapcar
      #'(lambda (def)
          (let ((variable (nth 0 def))
                (value (nth 1 def))
                (comment (nth 2 def)))
            (unless (and comment (stringp comment))
              (setq comment (format "Customized with use-package %s" name)))
            `(customize-set-variable (quote ,variable) ,value ,comment)))
      args))
   (use-package-process-keywords name rest state)))