diff options
author | Gemini Lasswell <gazally@runbox.com> | 2018-05-29 11:41:09 -0700 |
---|---|---|
committer | Gemini Lasswell <gazally@runbox.com> | 2018-06-07 08:27:43 -0700 |
commit | c6ef3c8321e4907a250eb0906274f6f59d5bfe0d (patch) | |
tree | b841c43da3cb7fd786504f6175e53b03857b8646 /lisp/emacs-lisp | |
parent | 26b52ac40e78cb7ac3df3bf87e514ad137f0ce10 (diff) | |
download | emacs-c6ef3c8321e4907a250eb0906274f6f59d5bfe0d.tar.gz emacs-c6ef3c8321e4907a250eb0906274f6f59d5bfe0d.tar.bz2 emacs-c6ef3c8321e4907a250eb0906274f6f59d5bfe0d.zip |
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 #'.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/cl-print.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el index 780b9fb3fe9..66561ce2644 100644 --- a/lisp/emacs-lisp/cl-print.el +++ b/lisp/emacs-lisp/cl-print.el @@ -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) |