emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: customize: bug with "(choice (list (set ...)))"


From: Luc Teirlinck
Subject: Re: customize: bug with "(choice (list (set ...)))"
Date: Thu, 3 Mar 2005 17:11:59 -0600 (CST)

Reiner Steib wrote:

   The declaration I tried, see (1) below, doesn't work (maybe I'm
   doing something wrong?).  Neither in current CVS nor in Emacs 21.4.

>From (elisp)Type Keywords:

    `:value DEFAULT'
         This is used for a type that appears as an alternative inside of
         `choice';

and:

     If `nil' is not a valid value for the alternative, then it is
     essential to specify a valid default with `:value'.

(Of course, this remark does not apply to const.)  Sometimes you can
get away with not doing that.  You can get away with it for the
function part of your choice, because there 'ignore is used as default
if you do not provide any.  Apparently not for your list choice.  What
about the following?  (Seems to work for me)

(defcustom my-test 'foo-bar
  "Foo bar"
  :group 'LaTeX-macro
  :type '(choice (const :tag "TeX search" foo-bar)
                 (function :tag "Other function")
                 (list :value ("Antibes" "Warsaw")
                       (set :inline t
                            (const "Antibes")
                            (const "Warsaw"))
                       (repeat :inline t
                               :tag "Other"
                               (string)))))
(customize-variable 'my-test)

Sincerely,

Luc.




reply via email to

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