Subject: bug#10907: 24.0.94; Updating display of Customize buffer

From: Stephen Berman <[email-masked]>
Date: Tue, 28 Feb 2012 16:19:51 +0100

On Tue, 28 Feb 2012 14:46:47 +0100 Andreas Schwab <[email-masked]> wrote:

> Stephen Berman <[email-masked]> writes:
>
>> 7. In the Customize buffer hide and then re-show the value of
>> srb-selected-file; now the Customize buffer shows this:
>>
>>  Srb Selected File: "file1"
>>      State: STANDARD. (mismatch)
>>      A selected file name from `srb-file-list'.
>
> The current value does not match any of the empty set of choices.

Do you mean that Custom thinks srb-file-list is still empty?  If so, and
if I add a check, that fixes the mismatch, but not the display.
Specifically, if I change the definition of srb-selected-file to this:

(defcustom srb-selected-file (car srb-file-list)
  "A selected file name from `srb-file-list'."
  :type (if srb-file-list
	    `(radio ,@(mapcar (lambda (x) (list 'const x)) srb-file-list))) 
  :group 'srb)

then when srb-dir is empty or nonexistant, the Custom buffer shows this:

 Srb Selected File: nil
     State: STANDARD.
     A selected file name from `srb-file-list'.

and after I add a file and refresh the display by hiding and unhiding
the value, it shows this:

 Srb Selected File: "file1"
     State: STANDARD.
     A selected file name from `srb-file-list'.

I still see the list of radio buttons only after restarting Emacs.  So I
guess the defcustom is still wrong; do you know how to fix it?

Steve Berman