Re: Should (boundp object) be tested and what would it mean
Stefan Monnier via Users list for the GNU Emacs text editor <[email protected]>
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
> (defun lana-obnam (object) > "Return variable/symbol NAME holding OBJECT." The variable named `object` is the one holding OBJECT. You can't test OBJECT to find if some other variable may hold it as well. > (cond > ((symbolp object) (symbol-name object)) Here, you're returning the name of OBJECT when OBJECT is a symbol. But that doesn't mean that the variable of that name (if it exists) holds OBJECT (unless OBJECT is a symbol whose value is itself, which is unusual but does occur occasionally). === Stefan