all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: TheFlyingDutchman <zzbbaadd@aol.com>
To: help-gnu-emacs@gnu.org
Subject: Re: variable's documentation string
Date: Tue, 30 Jun 2009 13:33:12 -0700 (PDT)	[thread overview]
Message-ID: <e381c5a7-473b-42b1-802f-db2836601e32@l32g2000vbp.googlegroups.com> (raw)
In-Reply-To: 7ctz1yhzvp.fsf@pbourguignon.anevia.com


>
> So if you want an error instead of nil, you have to ask it yourself:
>
> (defun variable-documentation (var)
>    (or (documentation-property var 'variable-documentation)
>        (error "Variable %S has no documentation" var)))
>
> (variable-documentation 'xyz)
> ==> Debugger entered--Lisp error: (error "Variable xyz has no documentation")
>
> (variable-documentation 'myVar)
> --> "This is the documentation string"
>
> --
> __Pascal Bourguignon__

Thanks Pascal. What I was hoping for was not an error if documentation
is nil, but if the symbol name was invalid. But I guess in Emacs Lisp
there is no such thing as an invalid symbol name. So it would have to
be an error if the symbol was only created from a "read or use", not
from a setq or defvar, etc.


  reply	other threads:[~2009-06-30 20:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-29  7:24 variable's documentation string TheFlyingDutchman
2009-06-29  7:25 ` TheFlyingDutchman
2009-06-29  9:24   ` Pascal J. Bourguignon
2009-06-29 22:47     ` TheFlyingDutchman
2009-06-30  6:22       ` Kevin Rodgers
2009-06-30  8:47       ` Pascal J. Bourguignon
2009-06-30 20:33         ` TheFlyingDutchman [this message]
2009-06-30 21:37           ` Pascal J. Bourguignon
     [not found]       ` <mailman.1557.1246352126.2239.help-gnu-emacs@gnu.org>
2009-06-30 20:30         ` TheFlyingDutchman
2009-06-30 20:44           ` Pascal J. Bourguignon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e381c5a7-473b-42b1-802f-db2836601e32@l32g2000vbp.googlegroups.com \
    --to=zzbbaadd@aol.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.