1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 06:20:43 -08:00

Make cl-print respect print-quoted (bug#31649)

* lisp/emacs-lisp/cl-print.el (cl-print-object) <cons>: Observe
print-quoted when printing quote and its relatives.  Add printing of
'function' as #'.
This commit is contained in:
Gemini Lasswell 2018-05-29 11:41:09 -07:00
parent 26b52ac40e
commit c6ef3c8321
2 changed files with 17 additions and 2 deletions

View file

@ -61,11 +61,16 @@ call other entry points instead, such as `cl-prin1'."
(princ "..." stream)
(let ((car (pop object))
(count 1))
(if (and (memq car '(\, quote \` \,@ \,.))
(if (and print-quoted
(memq car '(\, quote function \` \,@ \,.))
(consp object)
(null (cdr object)))
(progn
(princ (if (eq car 'quote) '\' car) stream)
(princ (cond
((eq car 'quote) '\')
((eq car 'function) "#'")
(t car))
stream)
(cl-print-object (car object) stream))
(princ "(" stream)
(cl-print-object car stream)