emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master aed6e2f: Compilation work-around for obsolete eieio


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master aed6e2f: Compilation work-around for obsolete eieio-object-set-name-string
Date: Mon, 17 Jun 2019 15:53:35 -0400 (EDT)

branch: master
commit aed6e2f7c6517fd27589a9c618799c3deb88f96e
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    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.
---
 lisp/emacs-lisp/eieio-base.el | 8 ++++++++
 lisp/emacs-lisp/eieio.el      | 8 --------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/emacs-lisp/eieio-base.el b/lisp/emacs-lisp/eieio-base.el
index 0b2909c..b6358bd 100644
--- a/lisp/emacs-lisp/eieio-base.el
+++ b/lisp/emacs-lisp/eieio-base.el
@@ -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."
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index 3169541..400599a 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."
             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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]