aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-06-17 21:53:22 +0200
committerLars Ingebrigtsen2019-06-17 21:53:22 +0200
commitaed6e2f7c6517fd27589a9c618799c3deb88f96e (patch)
tree07060aa8341d7fa49a024f72ce38b75fc7e963cf
parentf8efeee0e1033ca45885210c44a5f72c47d2d6a6 (diff)
downloademacs-aed6e2f7c6517fd27589a9c618799c3deb88f96e.tar.gz
emacs-aed6e2f7c6517fd27589a9c618799c3deb88f96e.zip
Compilation work-around for obsolete eieio-object-set-name-string
* lisp/emacs-lisp/eieio-base.el (eieio-object-set-name-string): Move the generic definition of this method to here from eieio.el and place it after the cl-method definition. This avoids a warning about it being obsolete when doing macro expansion.
-rw-r--r--lisp/emacs-lisp/eieio-base.el8
-rw-r--r--lisp/emacs-lisp/eieio.el8
2 files changed, 8 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index 0b2909c1e8d..b6358bdd0f9 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -513,6 +513,14 @@ instance."
513 (cl-check-type name string) 513 (cl-check-type name string)
514 (eieio-oset obj 'object-name name)) 514 (eieio-oset obj 'object-name name))
515 515
516(cl-defgeneric eieio-object-set-name-string (obj name)
517 "Set the string which is OBJ's NAME."
518 (declare (obsolete "inherit from `eieio-named' and use (setf (slot-value OBJ \\='object-name) NAME) instead" "25.1"))
519 (cl-check-type name string)
520 (setf (gethash obj eieio--object-names) name))
521(define-obsolete-function-alias
522 'object-set-name-string 'eieio-object-set-name-string "24.4")
523
516(cl-defmethod clone ((obj eieio-named) &rest params) 524(cl-defmethod clone ((obj eieio-named) &rest params)
517 "Clone OBJ, initializing `:parent' to OBJ. 525 "Clone OBJ, initializing `:parent' to OBJ.
518All slots are unbound, except those initialized with PARAMS." 526All slots are unbound, except those initialized with PARAMS."
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 3169541e5bf..400599a73ed 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -408,14 +408,6 @@ If EXTRA, include that in the string returned to represent the symbol."
408 extra)))) 408 extra))))
409(define-obsolete-function-alias 'object-name #'eieio-object-name "24.4") 409(define-obsolete-function-alias 'object-name #'eieio-object-name "24.4")
410 410
411(cl-defgeneric eieio-object-set-name-string (obj name)
412 "Set the string which is OBJ's NAME."
413 (declare (obsolete "inherit from `eieio-named' and use (setf (slot-value OBJ \\='object-name) NAME) instead" "25.1"))
414 (cl-check-type name string)
415 (setf (gethash obj eieio--object-names) name))
416(define-obsolete-function-alias
417 'object-set-name-string 'eieio-object-set-name-string "24.4")
418
419(defun eieio-object-class (obj) 411(defun eieio-object-class (obj)
420 "Return the class struct defining OBJ." 412 "Return the class struct defining OBJ."
421 ;; FIXME: We say we return a "struct" but we return a symbol instead! 413 ;; FIXME: We say we return a "struct" but we return a symbol instead!