diff options
author | Eric Abrahamsen <eric@ericabrahamsen.net> | 2017-11-18 10:18:53 -0800 |
---|---|---|
committer | Eric Abrahamsen <eric@ericabrahamsen.net> | 2017-11-18 10:18:53 -0800 |
commit | d547f417c89d92267ddeff296a81a68c36d64c4d (patch) | |
tree | 0315032fa60dfd3a39c7359376e576896e502db9 /lisp/emacs-lisp/eieio.el | |
parent | 52cc9a57f43bc0fee9adb20fc0b202dcc6af7575 (diff) | |
download | emacs-d547f417c89d92267ddeff296a81a68c36d64c4d.tar.gz emacs-d547f417c89d92267ddeff296a81a68c36d64c4d.tar.bz2 emacs-d547f417c89d92267ddeff296a81a68c36d64c4d.zip |
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.
Diffstat (limited to 'lisp/emacs-lisp/eieio.el')
-rw-r--r-- | lisp/emacs-lisp/eieio.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 9276fab0c39..d0d2ff5145c 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -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))) |