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)
committerMichael Heerdegen <michael_heerdegen@web.de>
Mon, 27 May 2024 17:51:39 +0000 (19:51 +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.

lisp/emacs-lisp/pp.el

index 3176ee42533dd0317a6df1634c72136c3a89223e..e550bd4d689e041fa0f04681bbe08c6d3fe3bd4a 100644 (file)
@@ -491,7 +491,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)