aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2017-03-07 20:35:40 -0500
committerStefan Monnier2017-03-07 20:35:40 -0500
commit1a6597660a405fe78885476f8761cab79167b4e1 (patch)
tree96e3781934da8fc921a8b8b4153832994febd5da
parenta65236214d9202fb69a6ba5169d4ac1a4bcb0b0d (diff)
downloademacs-1a6597660a405fe78885476f8761cab79167b4e1.tar.gz
emacs-1a6597660a405fe78885476f8761cab79167b4e1.zip
* lisp/emacs-lisp/cl-print.el (cl-print-object): Use #f(..) for functions.
-rw-r--r--lisp/emacs-lisp/cl-print.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el
index 7e886fba08a..b4a7be805a3 100644
--- a/lisp/emacs-lisp/cl-print.el
+++ b/lisp/emacs-lisp/cl-print.el
@@ -75,9 +75,10 @@ call other entry points instead, such as `cl-prin1'."
75 (princ "]" stream)) 75 (princ "]" stream))
76 76
77(cl-defmethod cl-print-object ((object compiled-function) stream) 77(cl-defmethod cl-print-object ((object compiled-function) stream)
78 (princ "#<compiled-function " stream) 78 ;; We use "#f(...)" rather than "#<...>" so that pp.el gives better results.
79 (princ "#f(compiled-function " stream)
79 (prin1 (help-function-arglist object 'preserve-names) stream) 80 (prin1 (help-function-arglist object 'preserve-names) stream)
80 (princ " #<bytecode> >" stream)) 81 (princ " #<bytecode>)" stream))
81 82
82;; This belongs in nadvice.el, of course, but some load-ordering issues make it 83;; This belongs in nadvice.el, of course, but some load-ordering issues make it
83;; complicated: cl-generic uses macros from cl-macs and cl-macs uses advice-add 84;; complicated: cl-generic uses macros from cl-macs and cl-macs uses advice-add
@@ -87,7 +88,7 @@ call other entry points instead, such as `cl-prin1'."
87 ((object compiled-function) stream) 88 ((object compiled-function) stream)
88 (if (not (advice--p object)) 89 (if (not (advice--p object))
89 (cl-call-next-method) 90 (cl-call-next-method)
90 (princ "#<advice-wrapper " stream) 91 (princ "#f(advice-wrapper " stream)
91 (when (fboundp 'advice--where) 92 (when (fboundp 'advice--where)
92 (princ (advice--where object) stream) 93 (princ (advice--where object) stream)
93 (princ " " stream)) 94 (princ " " stream))
@@ -98,7 +99,7 @@ call other entry points instead, such as `cl-prin1'."
98 (when props 99 (when props
99 (princ " " stream) 100 (princ " " stream)
100 (cl-print-object props stream))) 101 (cl-print-object props stream)))
101 (princ ">" stream))) 102 (princ ")" stream)))
102 103
103(cl-defmethod cl-print-object ((object cl-structure-object) stream) 104(cl-defmethod cl-print-object ((object cl-structure-object) stream)
104 (princ "#s(" stream) 105 (princ "#s(" stream)