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:
parent
99643f8873
commit
8ef7978028
2 changed files with 15 additions and 1 deletions
|
|
@ -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)))
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue