emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f43b8f3831: Don't bug out on improper lists in pp-emacs-lisp-code


From: Lars Ingebrigtsen
Subject: master f43b8f3831: Don't bug out on improper lists in pp-emacs-lisp-code
Date: Sat, 15 Jan 2022 04:41:24 -0500 (EST)

branch: master
commit f43b8f3831951dfc93e99b2c9f0eeb8f6126ca88
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    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 d199716b2c..e782cdb1da 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]