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

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

bug#49274: [PATCH] lisp/cus-theme: retain documentation string when cust


From: Mauro Aranda
Subject: bug#49274: [PATCH] lisp/cus-theme: retain documentation string when customizing theme
Date: Tue, 29 Jun 2021 19:38:05 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hello Christopher,

Christopher League <league@contrapunctus.net> writes:

> When editing an existing theme using `custom-theme-visit-theme`, the
> theme's documentation string would always be discarded and replaced
> with "Created DATE."
>
> With this improvement, the existing theme documentation string (if
> available) will be presented and editable in the widget, and emitted
> in the `deftheme` declaration when saved. A newly-created theme or an
> existing theme with no documentation string will get the "Created
> DATE" as before.

I think this is a good change.

> *Implementation details:* we had to move the chunk marked "Load the
> theme settings" earlier in the function `customize-create-theme`. Then
> the `custom-theme-description` widget was made an `editable-field`
> whose value comes from `theme-documentation` if available, else
> `format-time-string`. The rest of the patch is reindentation due to
> the larger scope of the let that holds the theme settings.

Why change the widget from a text widget to an editable-field
widget? I think a text widget is better here, since a docstring usually
would have more than one line, and the editable-field keymap remaps RET
while the text keymap doesn't.





reply via email to

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