Record :version for built-in variables while dumping

* lisp/cus-start.el (standard): Record the ':version; of the
symbols when dumping, so that 'describe-variable' could tell
which built-in variables were added/changed in recent
versions.
This commit is contained in:
Eli Zaretskii 2018-09-07 10:35:59 +03:00
parent 82160cf0c1
commit 96281c5ee1

View file

@ -706,6 +706,8 @@ since it could result in memory overflow and make Emacs crash."
(put symbol 'risky-local-variable (cadr prop))) (put symbol 'risky-local-variable (cadr prop)))
(if (setq prop (memq :set rest)) (if (setq prop (memq :set rest))
(put symbol 'custom-set (cadr prop))) (put symbol 'custom-set (cadr prop)))
;; This is used by describe-variable.
(if version (put symbol 'custom-version version))
;; Note this is the _only_ initialize property we handle. ;; Note this is the _only_ initialize property we handle.
(if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay) (if (eq (cadr (memq :initialize rest)) 'custom-initialize-delay)
;; These vars are defined early and should hence be initialized ;; These vars are defined early and should hence be initialized
@ -724,7 +726,6 @@ since it could result in memory overflow and make Emacs crash."
(custom-add-to-group group symbol 'custom-variable)) (custom-add-to-group group symbol 'custom-variable))
;; Set the type. ;; Set the type.
(put symbol 'custom-type type) (put symbol 'custom-type type)
(if version (put symbol 'custom-version version))
(while rest (while rest
(setq prop (car rest) (setq prop (car rest)
propval (cadr rest) propval (cadr rest)