unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Chong Yidong'" <cyd@stupidchicken.com>
Cc: 'Glenn Morris' <rgm@gnu.org>,
	emacs-devel@gnu.org, 'Stefan Monnier' <monnier@iro.umontreal.ca>,
	'Lute Kamstra' <Lute.Kamstra.lists@xs4all.nl>,
	'Juanma Barranquero' <lekktu@gmail.com>
Subject: RE: Leading * in docstrings of defcustoms.
Date: Mon, 24 Nov 2008 14:43:58 -0800	[thread overview]
Message-ID: <006401c94e86$23d44d70$c2b22382@us.oracle.com> (raw)
In-Reply-To: <87wses3lpg.fsf@cyd.mit.edu>

> They should already be omitted, or strongly deprecated, in 
> the manuals. For example, the Variable Definitions node in
> the Lisp manual says
> 
>   There is no need to start [the docstring] with a `*', because
>   `defcustom' automatically marks `option' as a "user option"
> 
> If you find a spot in the manual that still follows the old 
> convention, please let us know.

Elisp manual nodes:

* Defining Variables

  If the variable is a user option that users would want to set
  interactively, you should use `*' as the first character of
                 ^^^^^^^^^^^^^^^^^^
  DOC-STRING.  This lets users set the variable conveniently using
  the `set-variable' command.  Note that you should nearly always
  use `defcustom' instead of `defvar' to define these variables, so
  that users can use `M-x customize' and related commands to set
  them.  *Note Customization::.

  ...

  User option variables are distinguished from other variables either
  though being declared using `defcustom'(1) or by the first
  character of their `variable-documentation' property.  If the
  property exists and is a string, and its first character is `*',
  then the variable is a user option.  Aliases of user options are
  also user options.

While this "if" is true, and nothing here claims the "only if" case, it's easy
to misread that text to also think the "only if" case applies, that is, that if
a symbol has property `variable-documentation' then `*' is _required_ for a
variable to be a user option.

* Accessing Documentation

  goal-column     Option
  *Semipermanent goal column for vertical motion, as set by ...

  The asterisk `*' as the first character of a variable's doc string,
  as shown above for the `goal-column' variable, means that it is a user
  option; see the description of `defvar' in *Note Defining Variables::.

Again, depending on what is understood by "means", one can read this as saying
that `*' is necessary if you want the variable to be a user option. Especially
considering that `goal-column' is a defcustom, this text should perhaps be
removed or updated.






  reply	other threads:[~2008-11-24 22:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-22 19:31 Leading * in docstrings of defcustoms Lute Kamstra
2008-11-22 22:00 ` Juanma Barranquero
2008-11-24  7:52   ` Glenn Morris
2008-11-24  8:31     ` Juanma Barranquero
2008-11-24 16:02     ` Stefan Monnier
2008-11-24 16:55       ` Drew Adams
2008-11-24 20:36         ` Chong Yidong
2008-11-24 22:43           ` Drew Adams [this message]
2008-11-24 23:21             ` Chong Yidong
2008-11-24 17:48       ` Stephen J. Turnbull
2008-11-25  5:50     ` Lute Kamstra
2008-11-28 12:48       ` Lute Kamstra
2008-11-28 12:58         ` Juanma Barranquero

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='006401c94e86$23d44d70$c2b22382@us.oracle.com' \
    --to=drew.adams@oracle.com \
    --cc=Lute.Kamstra.lists@xs4all.nl \
    --cc=cyd@stupidchicken.com \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    --cc=rgm@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).