summaryrefslogtreecommitdiff
path: root/lisp/use-package/use-package-core.el
diff options
context:
space:
mode:
authorTed Zlatanov <tzz@lifelogs.com>2021-02-06 04:21:59 -0500
committerGitHub <noreply@github.com>2021-02-06 04:21:59 -0500
commitc425e67a19526a0bda7bf52cdffde600c1696e01 (patch)
tree9149a967b13e4163206b76b093d16e8106a91b88 /lisp/use-package/use-package-core.el
parente4daf0cd42ef71f85906c2b793d555fcb5c6660a (diff)
parente3938e7b267a645891eb4c95860b1a24d30edb0e (diff)
downloademacs-c425e67a19526a0bda7bf52cdffde600c1696e01.tar.gz
emacs-c425e67a19526a0bda7bf52cdffde600c1696e01.tar.bz2
emacs-c425e67a19526a0bda7bf52cdffde600c1696e01.zip
Merge pull request from kljohann/custom-use-single-let
Use a single let binding when expanding consecutive :custom forms GitHub-reference: https://github.com/jwiegley/use-package/issues/906
Diffstat (limited to 'lisp/use-package/use-package-core.el')
-rw-r--r--lisp/use-package/use-package-core.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/use-package/use-package-core.el b/lisp/use-package/use-package-core.el
index 9edcff0ea15..72e080001b2 100644
--- a/lisp/use-package/use-package-core.el
+++ b/lisp/use-package/use-package-core.el
@@ -1397,17 +1397,18 @@ no keyword implies `:all'."
(defun use-package-handler/:custom (name _keyword args rest state)
"Generate use-package custom keyword code."
(use-package-concat
- (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)))
- `(let ((custom--inhibit-theme-enable nil))
- (custom-theme-set-variables 'use-package
- '(,variable ,value nil () ,comment)))))
- args)
+ `((let ((custom--inhibit-theme-enable nil))
+ (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))))
(use-package-process-keywords name rest state)))
;;;; :custom-face