]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't let pp fall back to prin1 for conses
authorMichael Heerdegen <michael_heerdegen@web.de>
Sun, 26 May 2024 14:31:26 +0000 (16:31 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 27 May 2024 20:27:41 +0000 (22:27 +0200)
* lisp/emacs-lisp/pp.el (pp--insert-lisp): Don't `prin1' non-list
conses; use our pp function for cons and list printing
`pp--format-list' instead.

(cherry picked from commit 804f36d5abdbc38a4664a341aaea563195f79b03)

lisp/emacs-lisp/pp.el

index 0b4a6187e1dfa9b0a348058c72db739d060a06e6..7411e07b97826f4c9039b9d72d60159c079ce06f 100644 (file)
@@ -492,7 +492,7 @@ the bounds of a region containing Lisp code to pretty-print."
                     (pp--insert-lisp (cadr sexp)))
                 (pp--format-list sexp))))
            (t
-            (prin1 sexp (current-buffer)))))
+            (pp--format-list sexp))))
     ;; Print some of the smaller integers as characters, perhaps?
     (integer
      (if (<= ?0 sexp ?z)