Variable: use-package-merge-key-alist
use-package-merge-key-alist is a customizable variable defined in
use-package-core.el.gz.
Value
((: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)))
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")