From: Lars Ingebrigtsen Date: Sat, 15 Jan 2022 09:40:39 +0000 (+0100) Subject: Don't bug out on improper lists in pp-emacs-lisp-code X-Git-Tag: emacs-29.0.90~3035 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f43b8f3831951dfc93e99b2c9f0eeb8f6126ca88;p=emacs.git 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). --- 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)