summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eieio.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-06-17 11:42:03 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-17 11:42:03 +0200
commit3820b77c9e32fa157803cb004d308163c7b7e33e (patch)
treefaf36c8c3e1447a1f0cebd399d6d81eda37564ea /lisp/emacs-lisp/eieio.el
parent5a35377fedf0c80bddb7eabb44e94fcc754a25de (diff)
downloademacs-3820b77c9e32fa157803cb004d308163c7b7e33e.tar.gz
Suppress warning about object-print in eieio.el
* lisp/emacs-lisp/eieio.el (cl-print-object): Suppress the warning about object-print being obsolete, since there are no in-tree methods like that any more.
Diffstat (limited to 'lisp/emacs-lisp/eieio.el')
-rw-r--r--lisp/emacs-lisp/eieio.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 5bb08ee3e37..4f73c606df9 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -853,8 +853,11 @@ to prepend a space."
(cl-defmethod cl-print-object ((object eieio-default-superclass) stream)
"Default printer for EIEIO objects."
- ;; Fallback to the old `object-print'.
- (princ (object-print object) stream))
+ ;; Fallback to the old `object-print'. There should be no
+ ;; `object-print' methods in the Emacs tree, but there may be some
+ ;; out-of-tree.
+ (with-suppressed-warnings ((obsolete object-print))
+ (princ (object-print object) stream)))
(defvar eieio-print-depth 0
"The current indentation depth while printing.