1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-11 22:11:21 -08:00

set saved-variable-comment from :custom

GitHub-reference: https://github.com/jwiegley/use-package/issues/861
This commit is contained in:
Ted Zlatanov 2020-08-22 18:42:36 -04:00
parent 99643f8873
commit 8ef7978028
2 changed files with 15 additions and 1 deletions

View file

@ -1396,7 +1396,8 @@ no keyword implies `:all'."
(setq comment (format "Customized with use-package %s" name)))
`(funcall (or (get (quote ,variable) 'custom-set) #'set-default)
(quote ,variable)
,value)))
,value)
`(put (quote ,variable) 'saved-variable-comment ,comment)))
args)
(use-package-process-keywords name rest state)))

View file

@ -1138,6 +1138,19 @@
(get 'foo 'custom-set)
(function set-default))
'foo bar)
(set 'foo 'saved-variable-comment "Customized with use-package foo")
(require 'foo nil nil))))
(ert-deftest use-package-test/:custom-with-comment1 ()
(match-expansion
(use-package foo :custom (foo bar "commented"))
`(progn
(funcall
(or
(get 'foo 'custom-set)
(function set-default))
'foo bar)
(set 'foo 'saved-variable-comment "commented")
(require 'foo nil nil))))
(ert-deftest use-package-test/:custom-face-1 ()