diff options
Diffstat (limited to 'lisp/emacs-lisp/eieio.el')
-rw-r--r-- | lisp/emacs-lisp/eieio.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index d0d2ff5145c..ab96547f939 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -926,6 +926,25 @@ this object." (object-write thing)) ((consp thing) (eieio-list-prin1 thing)) + ((hash-table-p thing) + (let ((copy (copy-hash-table thing))) + (maphash + (lambda (key val) + (setf (gethash key copy) + (read + (with-output-to-string + (eieio-override-prin1 val))))) + copy) + (prin1 copy))) + ((vectorp thing) + (let ((copy (copy-sequence thing))) + (dotimes (i (length copy)) + (aset copy i + (read + (with-output-to-string + (eieio-override-prin1 + (aref copy i)))))) + (prin1 copy))) ((eieio--class-p thing) (princ (eieio--class-print-name thing))) (t (prin1 thing)))) |