(defun c:mto ( / )
I hesitate to get into this.
What you have there is fine, though unneccesary. (defun c:mto () will also work, however, what you've done is globalized ALL your variables. You want to Localize them or one day you'll end up with a slow processing computer. To localize them we need to ADD
(defun c:mto (/ txtname txtlist pt1)
This will clear all your variables to nil when you are done processing the lisp. I have to work with an add-on right now that has all kinds of global dependencies. It sucks and if any of them gets changed, the whole program (add-on) won't work properly until I restart autocad.
As far as changing the variable names to make more sense, I agree, but what happens when we go from selecting single text objects to multiple text objects? Honestly, it doesn't matter, since the end user will never know the difference. As long as you, the code hacker can understand it when you go in to edit it 3 months down the line, is all that matters. What you wouldn't want to do is something like:
(defun c:mto () ;<-Naming like this isn't good either.
(setq a (car (entsel "\nSelect text: ")
b (entget a)
c (cdr (assoc 10 b))
)
)
After a while the code gets a little long and you'll tend to forget what "a" means.
Let's get back on topic. Localize your variables (/ txtname txtlist pt1).
All you need is the return value. Post your code and I'll see what's next.