From f43b8f3831951dfc93e99b2c9f0eeb8f6126ca88 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 15 Jan 2022 10:40:39 +0100 Subject: [PATCH] Don't bug out on improper lists in pp-emacs-lisp-code * lisp/emacs-lisp/pp.el (pp--format-list): Don't bug out on improper lists (bug#52917). --- lisp/emacs-lisp/pp.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index d199716b2c5..e782cdb1dab 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -273,7 +273,10 @@ Use the `pp-max-width' variable to control the desired line length." (insert "(") (pp--insert start (pop sexp)) (while sexp - (pp--insert " " (pop sexp))) + (if (consp sexp) + (pp--insert " " (pop sexp)) + (pp--insert " . " sexp) + (setq sexp nil))) (insert ")"))) (defun pp--format-function (sexp) -- 2.39.2