]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/cl-print.el (cl-print-object): Use #f(..) for functions.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 8 Mar 2017 01:35:40 +0000 (20:35 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 8 Mar 2017 01:35:40 +0000 (20:35 -0500)
lisp/emacs-lisp/cl-print.el

index 7e886fba08a9b890552550044c2eb7c0221d8335..b4a7be805a3da126fe51b81a21c5cfa608198993 100644 (file)
@@ -75,9 +75,10 @@ call other entry points instead, such as `cl-prin1'."
   (princ "]" stream))
 
 (cl-defmethod cl-print-object ((object compiled-function) stream)
-  (princ "#<compiled-function " stream)
+  ;; We use "#f(...)" rather than "#<...>" so that pp.el gives better results.
+  (princ "#f(compiled-function " stream)
   (prin1 (help-function-arglist object 'preserve-names) stream)
-  (princ " #<bytecode> >" stream))
+  (princ " #<bytecode>)" stream))
 
 ;; This belongs in nadvice.el, of course, but some load-ordering issues make it
 ;; 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'."
               ((object compiled-function) stream)
   (if (not (advice--p object))
       (cl-call-next-method)
-    (princ "#<advice-wrapper " stream)
+    (princ "#f(advice-wrapper " stream)
     (when (fboundp 'advice--where)
       (princ (advice--where object) stream)
       (princ " " stream))
@@ -98,7 +99,7 @@ call other entry points instead, such as `cl-prin1'."
       (when props
         (princ " " stream)
         (cl-print-object props stream)))
-    (princ ">" stream)))
+    (princ ")" stream)))
 
 (cl-defmethod cl-print-object ((object cl-structure-object) stream)
   (princ "#s(" stream)