GNU bug report logs - #49274
[PATCH] lisp/cus-theme: retain documentation string when customizing theme

Previous Next

Package: emacs;

Reported by: Christopher League <league <at> contrapunctus.net>

Date: Tue, 29 Jun 2021 15:34:01 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Mauro Aranda <maurooaranda <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Christopher League <league <at> contrapunctus.net>
Cc: 49274 <at> debbugs.gnu.org
Subject: bug#49274: [PATCH] lisp/cus-theme: retain documentation string when customizing theme
Date: Tue, 29 Jun 2021 19:38:05 -0300
Hello Christopher,

Christopher League <league <at> 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.




This bug report was last modified 3 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.