summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eieio.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-06-17 11:22:21 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-17 11:25:34 +0200
commit1dfd6b404236273f89071214288eb471018299e9 (patch)
treec365e25c58bee28daad5864635d50a71d10c138e /lisp/emacs-lisp/eieio.el
parentc89dc27c2c2157dd1704f9e4ab7b9adeb4d232da (diff)
downloademacs-1dfd6b404236273f89071214288eb471018299e9.tar.gz
Rewrite object-print methods in cedet to be cl-print-object methods
* lisp/cedet/semantic/db-el.el (object-print): Ditto. (object-print): Ditto. * lisp/cedet/semantic/db-global.el (object-print): Ditto. * lisp/cedet/semantic/db.el (object-print): Remove; unused. * lisp/cedet/semantic/db.el (semanticdb-debug-info): New method. (object-print): Rewritten to be cl-print-object. * lisp/emacs-lisp/eieio.el (eieio-object-name): Allow the EXTRA argument to be a list of strings.
Diffstat (limited to 'lisp/emacs-lisp/eieio.el')
-rw-r--r--lisp/emacs-lisp/eieio.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 7ad44b6d26c..5bb08ee3e37 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -398,7 +398,14 @@ contents of field NAME is matched against PAT, or they can be of
If EXTRA, include that in the string returned to represent the symbol."
(cl-check-type obj eieio-object)
(format "#<%s %s%s>" (eieio-object-class obj)
- (eieio-object-name-string obj) (or extra "")))
+ (eieio-object-name-string obj)
+ (cond
+ ((null extra)
+ "")
+ ((listp extra)
+ (concat " " (mapconcat #'identity extra " ")))
+ (t
+ extra))))
(define-obsolete-function-alias 'object-name #'eieio-object-name "24.4")
(cl-defgeneric eieio-object-set-name-string (obj name)