diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-15 10:40:39 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-01-15 10:40:39 +0100 |
commit | f43b8f3831951dfc93e99b2c9f0eeb8f6126ca88 (patch) | |
tree | 1c06d744d0693812563033ffcbb913538fa9afff /lisp/emacs-lisp/pp.el | |
parent | ad3971f885858dd6513e307a9eaa710bbad0e03a (diff) | |
download | emacs-f43b8f3831951dfc93e99b2c9f0eeb8f6126ca88.tar.gz |
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).
Diffstat (limited to 'lisp/emacs-lisp/pp.el')
-rw-r--r-- | lisp/emacs-lisp/pp.el | 5 |
1 files changed, 4 insertions, 1 deletions
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) |