[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47944: Unable to customize button face in `describe-package'
From: |
Stefan Kangas |
Subject: |
bug#47944: Unable to customize button face in `describe-package' |
Date: |
Sun, 25 Apr 2021 06:02:06 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
tags 47944 fixed
close 47944 28.1
thanks
Protesilaos Stavrou <info@protesilaos.com> writes:
> On 2021-04-21, 23:42 +0200, Stefan Kangas <stefan@marxist.se> wrote:
>
>> Severity: minor
>>
>> There is currently no way to customize the button face in
>> `describe-package'; the face is hard-coded. This leads to issues with
>> `hl-line-mode', for example:
>>
>> https://gitlab.com/protesilaos/modus-themes/-/issues/180
>>
>> I'm thinking that we could just use the `custom-button' face here as it
>> looks similar enough, and should already exist in most popular themes.
>>
>> diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
>> index 64d7d56019..f2e83d3fda 100644
>> --- a/lisp/emacs-lisp/package.el
>> +++ b/lisp/emacs-lisp/package.el
>> @@ -2696,9 +2696,9 @@ package-make-button
>> function is a convenience wrapper used by `describe-package-1'."
>> (let ((button-text (if (display-graphic-p) text (concat "[" text "]")))
>> (button-face (if (display-graphic-p)
>> - '(:box (:line-width 2 :color "dark grey")
>> - :background "light grey"
>> - :foreground "black")
>> + (progn
>> + (require 'cus-edit) ; for the custom-button face
>> + 'custom-button)
>> 'link)))
>> (apply #'insert-text-button button-text 'face button-face 'follow-link t
>> properties)))
>>
>> Thoughts?
>
> Is there any chance that cus-edit, from whence custom-button comes from,
> is not loaded while describe-package is in use?
Yes, try:
0. emacs -Q
1. M-x describe-package RET <some package from GNU ELPA> RET
> Otherwise yes, I think that face feels right and would solve the issue
> you linked to.
Thanks, I have now pushed this to master.