In other words, a block of code like this:
(setq initial-major-mode
(lambda ()
(text-mode)
(font-lock-mode)
))
... would come out looking like something like this:
If something like this already exists, what is it? And if it doesn't exist, how should I go about writing it?
I think you are looking for something like mwe-color-box.el