summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2023-03-06 16:51:07 +0100
committerAndrea Corallo <akrl@sdf.org>2023-03-06 17:23:15 +0100
commit4a7e657389a2c6367911b381bdf86dd83c09d325 (patch)
treebd2ec73a9361874c07c045dba44fc52fb53ac509
parent8a8a994cfab0a7413caa0f0849063accadf81393 (diff)
downloademacs-4a7e657389a2c6367911b381bdf86dd83c09d325.tar.gz
* lisp/emacs-lisp/comp.el (comp-prettyformat-insn): Fix (bug#61917)
-rw-r--r--lisp/emacs-lisp/comp.el10
1 files 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.