]> git.eshelyaron.com Git - emacs.git/commit
* lisp/custom.el: Avoid adding vars to load-history multiple times
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 May 2019 16:37:00 +0000 (12:37 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 6 May 2019 16:37:00 +0000 (12:37 -0400)
commit63091313490beee4c5ed9767195c2a3df98f0332
tree407991a7dc880293885e121fa40e823148aeb74e
parentf0c0b2cea3ffea7e3c53ff24c58e7a08ac40babb
* lisp/custom.el: Avoid adding vars to load-history multiple times

Avoid the abuse of (eval `(defvar ...)) which tends to end up
adding redundant entries in `load-history`, as discussed in
https://lists.gnu.org/r/help-gnu-emacs/2019-03/msg00237.html

(custom-initialize-default): Don't add to load-history.
(custom-declare-variable): Use internal--define-uninitialized-variable
and only add the var to load-history once.  Do it before calling
`initialize` so the special-variable-p flag is set.

* src/eval.c (Finternal__define_uninitialized_variable): New function.
(Fdefvar, Fdefconst): Use it.
(syms_of_eval): Defsubr' it.
lisp/custom.el
src/eval.c