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

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

bug#5358: 23.1; Adding comment loses customizations in progress


From: Mauro Aranda
Subject: bug#5358: 23.1; Adding comment loses customizations in progress
Date: Fri, 27 Sep 2019 12:04:37 -0300

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Mauro Aranda <maurooaranda@gmail.com> writes:
>
>> Subject: [PATCH] Don't discard customizations in progress when adding comments
>>  (Bug#5358)
>
> Looks good to me.  Just one tiny comment:
>
>> +  (condition-case nil
>> +      (let* ((symbol (widget-get widget :value))
>> +             (get (or (get symbol 'custom-get) 'default-value))
>> +             (value (if (default-boundp symbol)
>> +                        (funcall get symbol)
>> +                      (symbol-value symbol))))
>> +        (not (equal value (widget-value (car (widget-get widget :children))))))
>> +    (error t)))
>
> If it's just the funcall you expect that might fail, then moving the
> condition-case down there might be a better choice.  Having a
> condition-case around code that shouldn't fail can hide errors you don't
> want to hide.

Right, thanks for noticing that.

I've moved down the condition-case, and I've added an outer catch, to
avoid the comparison in case of an error.  I think that's OK, but if you
see something wrong, please let me know.

Attachment: 0001-Don-t-discard-customizations-in-progress-when-adding.patch
Description: Text Data


reply via email to

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