At first I didn't see that you had your lisps posted, so I made this version of mine, with most of it plain lisp
;;; Enclose Texts with Round(), Square[], Curly{}, sTraight||, Forward//, Backward\\
;;; Isaac A 20240203
(vl-load-com)
(defun c:ent (/ a b c d dw e f g o oe)
(setq oe (getvar 'cmdecho)
o (getvar 'osmode)
)
(setvar 'cmdecho 0)
(vla-startundomark (setq dw (vla-get-activedocument (vlax-get-acad-object))))
(setvar 'osmode 0)
(princ "\nSelect the texts.")
(if (setq a (ssget (list (cons 0 "TEXT,MTEXT"))))
(progn
(initget "Round Square Curly sTraight Forward Backward")
(setq b 0
c (sslength a)
d (getkword "Round(), Square[], Curly{}, sTraight||, Forward//, Backward\\\\ <R>: ")
)
(while (< b c)
(setq e (entget (ssname a b))
f (cdr (setq g (assoc 1 e)))
)
(cond
((= d "Round") (setq f (strcat "("f")")))
((= d "Square") (setq f (strcat "["f"]")))
((= d "Curly") (setq f (strcat "{"f"}")))
((= d "sTraight") (setq f (strcat "|"f"|")))
((= d "Forward") (setq f (strcat "/"f"/")))
((= d "Backward") (setq f (strcat "\\"f"\\")))
(T (setq f (strcat "("f")")))
)
(setq e (subst (cons 1 f) g e))
(entmod e)
(setq b (1+ b))
)
)
(princ "\nNo texts selected")
)
(setvar 'cmdecho oe)
(setvar 'osmode o)
(vla-endundomark dw)
(princ)
)