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

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

Re: custom types using define-widget


From: Per Abrahamsen
Subject: Re: custom types using define-widget
Date: Sat, 14 Jan 2006 08:07:46 +0100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)

Reiner Steib <reinersteib+gmane@imap.cc> writes:

> Now, I have six variables (more to come) like this one.  Repeating the
> full blown custom type for each variable is inconvenient and error
> prone in case of changes.  So I tried to define a widget using the
> same type as above:
>
> (define-widget 'rs-tool-bar-list 'default
>   "Tool bar list."
>   :tag "Tool bar list"
>   :type '(repeat (list (function :tag "Menu Command")
>                      (string   :tag "Icon file")
>                      (choice (const :tag "Default map" nil)
>                              ;; We need non-nil attributes if map is t.
>                              ;; (const :tag "No menu" t)
>                              (sexp :tag "Other map"))
>                      (repeat :tag "Properties" :inline t
>                              (list :inline t
>                                    (symbol :tag "Property")
>                                    (sexp :tag "Value"))))))
>

Try to derive from "lazy" instead of "default" (probably requires cvs
emacs). 




reply via email to

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