Variable: use-package-merge-key-alist

use-package-merge-key-alist is a customizable variable defined in use-package-core.el.gz.

Value

((:if
  . #[514 "\300E\207" [and] 5
	  ("/nix/store/4sqc1yyx22dax8qs94hnxkgyg1v6gqfn-emacs-snapshot/share/emacs/32.0.50/lisp/use-package/use-package-core.elc"
	   . 4753)])
 (:after
  . #[514 "\300E\207" [:all] 5
	  ("/nix/store/4sqc1yyx22dax8qs94hnxkgyg1v6gqfn-emacs-snapshot/share/emacs/32.0.50/lisp/use-package/use-package-core.elc"
	   . 4753)])
 (:defer
  . #[514 "\207" [] 3
	  ("/nix/store/4sqc1yyx22dax8qs94hnxkgyg1v6gqfn-emacs-snapshot/share/emacs/32.0.50/lisp/use-package/use-package-core.elc"
	   . 4753)])
 (:bind
  . #[514 "\300\301#\207" [append (:break)] 6
	  ("/nix/store/4sqc1yyx22dax8qs94hnxkgyg1v6gqfn-emacs-snapshot/share/emacs/32.0.50/lisp/use-package/use-package-core.elc"
	   . 4753)]))

Documentation

Alist of keys and the functions used to merge multiple values.

For example, if the following form is provided:

  (use-package foo :if pred1 :if pred2)

Then based on the above defaults, the merged result will be:

  (use-package foo :if (and pred1 pred2))

This is done so that, at the stage of invoking handlers, each handler is called only once.

This variable was added, or its default value changed, in Emacs 29.1.

Source Code

;; Defined in /usr/src/emacs/lisp/use-package/use-package-core.el.gz
(defcustom use-package-merge-key-alist
  `((:if    . ,(lambda (new old) `(and ,new ,old)))
    (:after . ,(lambda (new old) `(:all ,new ,old)))
    (:defer . ,(lambda (_new old) old))
    (:bind  . ,(lambda (new old) (append new (list :break) old))))
  "Alist of keys and the functions used to merge multiple values.
For example, if the following form is provided:

  (use-package foo :if pred1 :if pred2)

Then based on the above defaults, the merged result will be:

  (use-package foo :if (and pred1 pred2))

This is done so that, at the stage of invoking handlers, each
handler is called only once."
  :type `(repeat
          (cons (choice :tag "Keyword"
                        ,@(mapcar #'(lambda (k) (list 'const k))
                                  use-package-keywords)
                        (const :tag "Any" t))
                function))
  :group 'use-package
  :version "29.1")