1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-09 15:50:40 -08:00

Further fixes to writing of object names

Pursuant to 1ef6d2b0e6

* lisp/emacs-lisp/eieio.el (object-write): Only write the name in the
  comment when the comment's also present. Newline should only be
  printed if the name is.
This commit is contained in:
Eric Abrahamsen 2017-11-18 10:18:53 -08:00
parent 52cc9a57f4
commit d547f417c8

View file

@ -868,7 +868,7 @@ This writes out the vector version of this object. Complex and recursive
object are discouraged from being written.
If optional COMMENT is non-nil, include comments when outputting
this object."
(when eieio-print-object-name
(when (and comment eieio-print-object-name)
(princ ";; Object ")
(princ (eieio-object-name-string this))
(princ "\n"))
@ -887,8 +887,8 @@ this object."
(princ (symbol-name (eieio--class-constructor (eieio-object-class this))))
(when eieio-print-object-name
(princ " ")
(prin1 (eieio-object-name-string this)))
(princ "\n")
(prin1 (eieio-object-name-string this))
(princ "\n"))
;; Loop over all the public slots
(let ((slots (eieio--class-slots cv))
(eieio-print-depth (1+ eieio-print-depth)))