From d9c32c4bce32838fbe44a0f8bfb4ed04b34d65f7 Mon Sep 17 00:00:00 2001 From: Michael Heerdegen Date: Sun, 12 May 2024 19:58:14 +0200 Subject: [PATCH 2/2] Don't try to pretty print non-lists as binding list * lisp/emacs-lisp/pp.el (pp--format-definition): Avoid barfing for SEXPs like (let X Y) in `pcase' forms: ensure that what we try to print as a list of bindings actually has an appropriate format. --- lisp/emacs-lisp/pp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index f24b0d55520..aae3d2f78bf 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -576,7 +576,8 @@ pp--format-definition (unless (consp edebug) (setq edebug nil)) (if (and (consp (car edebug)) - (eq (caar edebug) '&rest)) + (eq (caar edebug) '&rest) + (proper-list-p (car sexp))) (pp--insert-binding (pop sexp)) (if (null (car sexp)) (insert "()") -- 2.39.2