]> git.eshelyaron.com Git - emacs.git/commitdiff
Include sxhash of object with printed bytecode
authorMark Oteiza <mvoteiza@udel.edu>
Mon, 11 Sep 2017 20:06:06 +0000 (16:06 -0400)
committerMark Oteiza <mvoteiza@udel.edu>
Mon, 11 Sep 2017 20:06:06 +0000 (16:06 -0400)
This printing, while succint, is rather opaque.  At least give an
immediate clue of whether different byte code printouts are for the
same or different byte code objects.
* lisp/emacs-lisp/cl-print.el (cl-print-object): Add object sxhash to
printed token "#<bytecode>".

lisp/emacs-lisp/cl-print.el

index e9ca041284802ecc463e407c90a89ec85c79b3c2..cf9407c8a7611c5441b66862cace3e9b9e6be351 100644 (file)
@@ -131,7 +131,7 @@ into a button whose action shows the function's disassembly.")
     (let ((button-start (and cl-print-compiled-button
                              (bufferp stream)
                              (with-current-buffer stream (point)))))
-      (princ "#<bytecode>" stream)
+      (princ (format "#<bytecode %x>" (sxhash object)) stream)
       (when (eq cl-print-compiled 'static)
         (princ " " stream)
         (cl-print-object (aref object 2) stream))