mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 03:39:38 +00:00
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
This commit is contained in:
commit
c425e67a19
1 changed files with 12 additions and 11 deletions
|
@ -1397,17 +1397,18 @@ no keyword implies `:all'."
|
||||||
(defun use-package-handler/:custom (name _keyword args rest state)
|
(defun use-package-handler/:custom (name _keyword args rest state)
|
||||||
"Generate use-package custom keyword code."
|
"Generate use-package custom keyword code."
|
||||||
(use-package-concat
|
(use-package-concat
|
||||||
(mapcar
|
`((let ((custom--inhibit-theme-enable nil))
|
||||||
#'(lambda (def)
|
(custom-theme-set-variables
|
||||||
(let ((variable (nth 0 def))
|
'use-package
|
||||||
(value (nth 1 def))
|
,@(mapcar
|
||||||
(comment (nth 2 def)))
|
#'(lambda (def)
|
||||||
(unless (and comment (stringp comment))
|
(let ((variable (nth 0 def))
|
||||||
(setq comment (format "Customized with use-package %s" name)))
|
(value (nth 1 def))
|
||||||
`(let ((custom--inhibit-theme-enable nil))
|
(comment (nth 2 def)))
|
||||||
(custom-theme-set-variables 'use-package
|
(unless (and comment (stringp comment))
|
||||||
'(,variable ,value nil () ,comment)))))
|
(setq comment (format "Customized with use-package %s" name)))
|
||||||
args)
|
`'(,variable ,value nil () ,comment)))
|
||||||
|
args))))
|
||||||
(use-package-process-keywords name rest state)))
|
(use-package-process-keywords name rest state)))
|
||||||
|
|
||||||
;;;; :custom-face
|
;;;; :custom-face
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue