emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 1a65976: * lisp/emacs-lisp/cl-print.el (cl-print-ob


From: Stefan Monnier
Subject: [Emacs-diffs] master 1a65976: * lisp/emacs-lisp/cl-print.el (cl-print-object): Use #f(..) for functions.
Date: Tue, 7 Mar 2017 20:35:46 -0500 (EST)

branch: master
commit 1a6597660a405fe78885476f8761cab79167b4e1
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/emacs-lisp/cl-print.el (cl-print-object): Use #f(..) for functions.
---
 lisp/emacs-lisp/cl-print.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/lisp/emacs-lisp/cl-print.el b/lisp/emacs-lisp/cl-print.el
index 7e886fb..b4a7be8 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'."
   (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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]