unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thorsten Jolitz <tjolitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: [BUG] in defcustom docstring (was Re: Whats wrong with this defcustom?)
Date: Tue, 29 Jul 2014 00:11:05 +0200	[thread overview]
Message-ID: <87zjftuoau.fsf_-_@gmail.com> (raw)
In-Reply-To: 87ha21g8qr.fsf@gnu.org

Tassilo Horn <tsdh@gnu.org> writes:

> Thorsten Jolitz <tjolitz@gmail.com> writes:
>
> Hi Thorsten,
>
>> I'm probably overlooking the obvious, but what is wrong with this
>> defcustom:
>>
>> ,----
>> | (defcustom org-x-style 'notes
>> |   "Possible styles for diagrams."
>> |   :group 'org-x
>> |   :type '(choice (const :tag "Sync-bars" 'sync-bars)
>> | 		 (const :tag "Partitions" 'partitions)
>> | 		 (const :tag "Notes" 'notes)))
>> `----
>
> ,----[ C-h f defcustom RET ]
> | defcustom is a Lisp macro in `custom.el'.
> | 
> | (defcustom SYMBOL STANDARD DOC &rest ARGS)
> | 
> | Declare SYMBOL as a customizable variable.
> | SYMBOL is the variable name; it should not be quoted.
> | STANDARD is an expression specifying the variable's standard
> | value.  It should not be quoted.
> |         ^^^^^^^^^^^^^^^^^^^^^^^
> `----

If I don't quote STANDARD I get a load-error, so either the docstring is
lying or I'm already confused about this whole issue ...

Recipe:

1. emacs -Q
2. C-x C-f ~/junk/test.el ; new empty test file
3. insert '(defcustom foo bar "loo")'
4. C-x C-s
5. M-x eval-buffer

-> 
,----
| custom-initialize-reset:
|   Symbol's value as variable is void: bar
`----

-- 
cheers,
Thorsten




  parent reply	other threads:[~2014-07-28 22:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26 10:55 Whats wrong with this defcustom? Thorsten Jolitz
2014-07-28  8:58 ` Tassilo Horn
2014-07-28 10:06   ` Thorsten Jolitz
2014-07-28 22:11   ` Thorsten Jolitz [this message]
2014-07-28 22:33   ` Stefan Monnier
2014-07-28 23:09     ` Thorsten Jolitz
2014-07-29  0:46       ` Robert Thorpe
2014-07-29  2:06         ` Thien-Thi Nguyen
2014-07-29 23:55           ` Robert Thorpe
2014-07-29  8:19         ` Thorsten Jolitz
     [not found]   ` <mailman.6168.1406585492.1147.help-gnu-emacs@gnu.org>
2014-07-29 16:48     ` [BUG] in defcustom docstring (was Re: Whats wrong with this defcustom?) Christoph Wedler
2014-07-28 13:17 ` Whats wrong with this defcustom? Sebastian Wiesner
2014-07-28 13:54   ` Thorsten Jolitz

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=87zjftuoau.fsf_-_@gmail.com \
    --to=tjolitz@gmail.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.
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).