Nicely format nil and t values in config file

This commit is contained in:
Renaud Casenave-Péré 2022-12-30 10:29:39 +01:00
parent 697706610e
commit f61ac1ed37

View file

@ -78,6 +78,10 @@
(when (boundp symbol)
(let ((value (symbol-value symbol)))
(cond
((null value)
(format stream "(setf ~(~a~) nil)~%" (symbol-name symbol)))
((eq value t)
(format stream "(setf ~(~a~) t)~%" (symbol-name symbol)))
((or (listp value) (consp value) (symbolp value))
(format stream "(setf ~(~a~) '~s)~%" (symbol-name symbol) value))
(t