Add cl-print method for hash tables

* lisp/emacs-lisp/cl-print.el (cl-print-object): New method.
This commit is contained in:
Mark Oteiza 2017-09-11 22:20:41 -04:00
parent 8130186cfb
commit 370e04fbb2

View file

@ -78,6 +78,16 @@ call other entry points instead, such as `cl-prin1'."
(cl-print-object (aref object i) stream))
(princ "]" stream))
(cl-defmethod cl-print-object ((object hash-table) stream)
(princ "#<hash-table " stream)
(princ (hash-table-test object) stream)
(princ " " stream)
(princ (hash-table-count object) stream)
(princ "/" stream)
(princ (hash-table-size object) stream)
(princ (format " 0x%x" (sxhash object)) stream)
(princ ">" stream))
(define-button-type 'help-byte-code
'follow-link t
'action (lambda (button)