help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Whats wrong with this defcustom?


From: Thorsten Jolitz
Subject: Re: Whats wrong with this defcustom?
Date: Mon, 28 Jul 2014 15:54:09 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Sebastian Wiesner <address@hidden> writes:

> Am 26.07.2014 um 12:55 schrieb Thorsten Jolitz <address@hidden>:
>
>> 
>> Hi List, 
>> 
>> 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)))
>> `——
>
> Remove the quotes from the symbols inside the `(const …)` expressions.
> The outer `choice` is already quoted, so you are “double-quoting” the
> choices.  Hence the mismatch: The symbol "notes" is different from the
> expression "(quote notes)".

Yes, thanks, I see it now but somehow did not see it before, there were
4 redundant quotes in that def, STANDARD and those inside the '(const
...)' expressions, I fixed that now.

,----[ 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.
`----

-- 
cheers,
Thorsten




reply via email to

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