]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix pp-emacs-lisp-code printing of cons cells
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 17 May 2022 17:45:20 +0000 (19:45 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 17 May 2022 17:45:20 +0000 (19:45 +0200)
* lisp/emacs-lisp/pp.el (pp--insert-lisp): Fix printing of cons
cells (bug#55478).

lisp/emacs-lisp/pp.el
test/lisp/emacs-lisp/pp-resources/code-formats.erts

index ad693fa5a61258f91f148d3b131872404898f5b2..3c849c2d01bde2ee10a2138f2225646b3e32487d 100644 (file)
@@ -250,7 +250,7 @@ Use the `pp-max-width' variable to control the desired line length."
                                    (set-marker (make-marker) (1- (point))))))
               (pp--format-list sexp)))
            (t
-            (princ sexp (current-buffer)))))
+            (prin1 sexp (current-buffer)))))
     ;; Print some of the smaller integers as characters, perhaps?
     (integer
      (if (<= ?0 sexp ?z)
index 002a5cf165006e64a05b10a03c8db588b37eb3b2..c3e3023cb195d11d85e4e505642f89aafdb56a44 100644 (file)
@@ -128,3 +128,15 @@ Name: code-formats12
 =-=
 (global-set-key (kbd "s-x") #'kill-region)
 =-=-=
+
+Name: code-formats13
+
+=-=
+'("a")
+=-=-=
+
+Name: code-formats14
+
+=-=
+'("a" . "b")
+=-=-=