Commit aed6e2f7 authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen

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.
parent f8efeee0
Pipeline #2134 failed with stage
in 62 minutes and 57 seconds
......@@ -513,6 +513,14 @@ instance."
(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"))
(cl-check-type name string)
(setf (gethash obj eieio--object-names) name))
(define-obsolete-function-alias
'object-set-name-string 'eieio-object-set-name-string "24.4")
(cl-defmethod clone ((obj eieio-named) &rest params)
"Clone OBJ, initializing `:parent' to OBJ.
All slots are unbound, except those initialized with PARAMS."
......
......@@ -408,14 +408,6 @@ If EXTRA, include that in the string returned to represent the symbol."
extra))))
(define-obsolete-function-alias 'object-name #'eieio-object-name "24.4")
(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"))
(cl-check-type name string)
(setf (gethash obj eieio--object-names) name))
(define-obsolete-function-alias
'object-set-name-string 'eieio-object-set-name-string "24.4")
(defun eieio-object-class (obj)
"Return the class struct defining OBJ."
;; FIXME: We say we return a "struct" but we return a symbol instead!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment