From 4a7e657389a2c6367911b381bdf86dd83c09d325 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 6 Mar 2023 16:51:07 +0100 Subject: [PATCH] * lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (bug#61917) --- lisp/emacs-lisp/comp.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 72e9b8e37dc..a1838b1abf2 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1137,10 +1137,12 @@ with `message'. Otherwise, log with `comp-log-to-buffer'." (comp-cstr-to-type-spec mvar))) (defun comp-prettyformat-insn (insn) - (cl-typecase insn - (comp-mvar (comp-prettyformat-mvar insn)) - (atom (prin1-to-string insn)) - (cons (concat "(" (mapconcat #'comp-prettyformat-insn insn " ") ")")))) + (cond + ((comp-mvar-p insn) + (comp-prettyformat-mvar insn)) + ((proper-list-p insn) + (concat "(" (mapconcat #'comp-prettyformat-insn insn " ") ")")) + (t (prin1-to-string insn)))) (defun comp-log-func (func verbosity) "Log function FUNC at VERBOSITY. -- 2.39.2