[Top][All Lists]

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

Re: variable's documentation string

From: Kevin Rodgers
Subject: Re: variable's documentation string
Date: Tue, 30 Jun 2009 00:22:34 -0600
User-agent: Thunderbird (Macintosh/20090605)

TheFlyingDutchman wrote:
Here, it works well:

(defvar myVar 2 "This is the documentation string")     ; C-x C-e
(documentation-property 'myVar 'variable-documentation) ; C-x C-e
--> "This is the documentation string"

Thanks Pascal! You lead me to the error. When I typed (documentation-
property 'some_variable 'variable-documentation) and evaluated it, it
worked. I then compared it to the equivalent part of the message
statement that I was using, and after 15 seconds of looking at it I
realized that I had incorrectly used a dash, instead of an underscore
for the variable name in the documentation-property function call. I
will have to remember to post the exact code I am using and not type
in something equivalent. But I would have expected to have gotten an
error because the symbol-name that I erroneously typed did not exist.
In fact, I would prefer it gave an error to returning nil.

That's not the way Lisp works.  When the form 'some_variable was read,
the symbol was created (with a void value, void function, and nil
property list).

If you evaluate (symbol-value 'some_variable) or (symbol-function
'some_variable), you'll get an error.  But not (symbol-plist

Kevin Rodgers
Denver, Colorado, USA

reply via email to

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