emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master d547f41: Further fixes to writing of object names


From: Eric Abrahamsen
Subject: [Emacs-diffs] master d547f41: Further fixes to writing of object names
Date: Sat, 18 Nov 2017 13:21:36 -0500 (EST)

branch: master
commit d547f417c89d92267ddeff296a81a68c36d64c4d
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>

    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.
---
 lisp/emacs-lisp/eieio.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 9276fab..d0d2ff5 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]