No Wayman writes: > In the meantime, I'd like to be able to offer the users of my package > a solution if they hit this bug. This seems to work for me, but I > haven't written much, and am a bit leery of, elisp advice. Would you > consider this an appropriate workaround?: Mostly yes, but IMO it's kind of over-engineered. I would do just: (defun workaround/describe-variable-print-bug (original-function &rest args) "Put temp buffer in emacs-lisp-mode before `pp-buffer'. https://debbugs.gnu.org/39805#8" (advice-add #'pp-buffer :before #'emacs-lisp-mode) (unwind-protect (apply original-function args) (advice-remove #'pp-buffer #'emacs-lisp-mode))) (when (= emacs-major-version 26) ;; Work around Bug#39805. (advice-add #'describe-variable :around #'workaround/describe-variable-print-bug))