From f0c1de75e128c3b35f8b6e9324a6bd58057af6cb Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 6 Apr 2025 19:05:06 -0400 Subject: [PATCH] cedet: Prefer `slot-value` over `eieio-object-name-string` * lisp/cedet/srecode/mode.el (srecode-minor-mode-templates-menu): * lisp/cedet/srecode/insert.el (srecode-insert-subtemplate): * lisp/cedet/srecode/compile.el (srecode-dump): Prefer `slot-value` over `eieio-object-name-string` since we know it's an `eieio-named` object. --- lisp/cedet/srecode/compile.el | 4 ++-- lisp/cedet/srecode/insert.el | 2 +- lisp/cedet/srecode/mode.el | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/cedet/srecode/compile.el b/lisp/cedet/srecode/compile.el index 05f70583c2a..95e86c63a90 100644 --- a/lisp/cedet/srecode/compile.el +++ b/lisp/cedet/srecode/compile.el @@ -590,7 +590,7 @@ A list of defined variables VARS provides a variable table." (cl-defmethod srecode-dump ((tmp srecode-template)) "Dump the contents of the SRecode template tmp." (princ "== Template \"") - (princ (eieio-object-name-string tmp)) + (princ (slot-value tmp 'object-name)) (princ "\" in context ") (princ (oref tmp context)) (princ "\n") @@ -636,7 +636,7 @@ Argument INDENT specifies the indentation level for the list." (cl-defmethod srecode-dump ((ins srecode-template-inserter) _indent) "Dump the state of the SRecode template inserter INS." (princ "INS: \"") - (princ (eieio-object-name-string ins)) + (princ (slot-value ins 'object-name)) (when (oref ins secondname) (princ "\" : \"") (princ (oref ins secondname))) diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el index 7189ad27c92..3b4da876a2c 100644 --- a/lisp/cedet/srecode/insert.el +++ b/lisp/cedet/srecode/insert.el @@ -805,7 +805,7 @@ Arguments ESCAPE-START and ESCAPE-END are the current escape sequences in use." (srecode-insert-report-error dict "Only section dictionaries allowed for `%s'" - (eieio-object-name-string sti))) + (slot-value sti 'object-name))) ;; Output the code from the sub-template. (srecode-insert-method (slot-value sti slot) dict)) diff --git a/lisp/cedet/srecode/mode.el b/lisp/cedet/srecode/mode.el index e266a7a679a..573f1f6afd7 100644 --- a/lisp/cedet/srecode/mode.el +++ b/lisp/cedet/srecode/mode.el @@ -207,7 +207,7 @@ MENU-DEF is the menu to bind this into." (ctxtcons (assoc ctxt alltabs)) (bind (if (slot-boundp temp 'binding) (oref temp binding))) - (name (eieio-object-name-string temp))) + (name (slot-value temp 'object-name))) (when (not ctxtcons) (if (string= context ctxt)