GNU bug report logs -
#47944
Unable to customize button face in `describe-package'
Previous Next
Reported by: Stefan Kangas <stefan <at> marxist.se>
Date: Wed, 21 Apr 2021 21:43:02 UTC
Severity: minor
Tags: fixed
Fixed in version 28.1
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 47944 in the body.
You can then email your comments to 47944 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
info <at> protesilaos.com, bug-gnu-emacs <at> gnu.org
:
bug#47944
; Package
emacs
.
(Wed, 21 Apr 2021 21:43:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Kangas <stefan <at> marxist.se>
:
New bug report received and forwarded. Copy sent to
info <at> protesilaos.com, bug-gnu-emacs <at> gnu.org
.
(Wed, 21 Apr 2021 21:43:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#47944
; Package
emacs
.
(Thu, 22 Apr 2021 21:04:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 47944 <at> debbugs.gnu.org (full text, mbox):
On 2021-04-21, 23:42 +0200, Stefan Kangas <stefan <at> 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?
Otherwise yes, I think that face feels right and would solve the issue
you linked to.
--
Protesilaos Stavrou
https://protesilaos.com
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#47944
; Package
emacs
.
(Sun, 25 Apr 2021 11:03:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 47944 <at> debbugs.gnu.org (full text, mbox):
tags 47944 fixed
close 47944 28.1
thanks
Protesilaos Stavrou <info <at> protesilaos.com> writes:
> On 2021-04-21, 23:42 +0200, Stefan Kangas <stefan <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#47944
; Package
emacs
.
(Sun, 25 Apr 2021 18:01:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 47944 <at> debbugs.gnu.org (full text, mbox):
On 2021-04-25, 06:02 -0500, Stefan Kangas <stefan <at> marxist.se> wrote:
> tags 47944 fixed
> close 47944 28.1
> thanks
[...]
> Thanks, I have now pushed this to master.
Thank you!
--
Protesilaos Stavrou
https://protesilaos.com
Added tag(s) fixed.
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Mon, 03 May 2021 00:28:01 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
47944 <at> debbugs.gnu.org and Stefan Kangas <stefan <at> marxist.se>
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Mon, 03 May 2021 00:28:01 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 31 May 2021 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 14 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.