diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-19 17:12:29 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-19 17:12:29 +0200 |
commit | fc8a8bdb7f19db2032b7e6108ba8de9d57c7acd4 (patch) | |
tree | 10da9a9fbe5baf0c0badfedef035a7da226a0fa8 /lisp/emacs-lisp/eieio-base.el | |
parent | 3fb6993c8ddf433fab4b98ae2948b961482ef947 (diff) | |
download | emacs-fc8a8bdb7f19db2032b7e6108ba8de9d57c7acd4.tar.gz |
Move around defgeneric/defmethods in eieio
* lisp/emacs-lisp/eieio.el (object-print):
* lisp/emacs-lisp/eieio-base.el (eieio-object-set-name-string):
Move the defgeneric before the defmethod, because that makes more
sense.
Diffstat (limited to 'lisp/emacs-lisp/eieio-base.el')
-rw-r--r-- | lisp/emacs-lisp/eieio-base.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el index b6358bdd0f9..534613811d4 100644 --- a/lisp/emacs-lisp/eieio-base.el +++ b/lisp/emacs-lisp/eieio-base.el @@ -508,11 +508,6 @@ instance." (or (slot-value obj 'object-name) (cl-call-next-method))) -(cl-defmethod eieio-object-set-name-string ((obj eieio-named) name) - "Set the string which is OBJ's NAME." - (cl-check-type name string) - (eieio-oset obj 'object-name name)) - (cl-defgeneric eieio-object-set-name-string (obj name) "Set the string which is OBJ's NAME." (declare (obsolete "inherit from `eieio-named' and use (setf (slot-value OBJ \\='object-name) NAME) instead" "25.1")) @@ -521,6 +516,12 @@ instance." (define-obsolete-function-alias 'object-set-name-string 'eieio-object-set-name-string "24.4") +(with-suppressed-warnings ((obsolete eieio-object-set-name-string)) + (cl-defmethod eieio-object-set-name-string ((obj eieio-named) name) + "Set the string which is OBJ's NAME." + (cl-check-type name string) + (eieio-oset obj 'object-name name))) + (cl-defmethod clone ((obj eieio-named) &rest params) "Clone OBJ, initializing `:parent' to OBJ. All slots are unbound, except those initialized with PARAMS." |