Mark settings obsolete (properly)

And make set! noisy about settings that don't exist anymore, when
evaling it interactively.
This commit is contained in:
Henrik Lissner 2018-06-18 13:38:27 +02:00
parent 0d925cda5e
commit 08f01edafd
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -377,7 +377,7 @@ omitted. eg. (featurep! +flag1)"
;; ;;
;; Cross-module configuration (DEPRECATED) ;; FIXME Cross-module configuration (deprecated)
;; ;;
;; I needed a way to reliably cross-configure modules without littering my ;; I needed a way to reliably cross-configure modules without littering my
@ -406,6 +406,8 @@ Do not use this for configuring Doom core."
,(if (and (not docstring) (fboundp alias)) ,(if (and (not docstring) (fboundp alias))
(documentation alias t) (documentation alias t)
docstring) docstring)
,(when alias
`(declare (obsolete ,alias "2.1.0")))
(prog1 (progn ,@forms) (prog1 (progn ,@forms)
,(when alias ,(when alias
`(unless noninteractive `(unless noninteractive
@ -421,7 +423,7 @@ VALUES doesn't get evaluated if the KEYWORD setting doesn't exist."
(let ((fn (intern-soft (format "doom--set%s" keyword)))) (let ((fn (intern-soft (format "doom--set%s" keyword))))
(if (and fn (fboundp fn)) (if (and fn (fboundp fn))
(apply fn values) (apply fn values)
(when doom-debug-mode (when (or doom-debug-mode after-init-time)
(message "No setting found for %s" keyword) (message "No setting found for %s" keyword)
nil)))) nil))))