--- Begin Message ---
Subject: |
30.0.50; Gnus: Add option to disable display of logo image in mode-line |
Date: |
Wed, 07 Feb 2024 22:02:35 +0000 |
By default, Gnus will attempt to display its logo as image in the
mode-line. I propose to introduce a defcustom variable that allows users
to disable its display. Find attached a patch that implements this. Let
me know your thoughts.
>From 7d3eb97c746ecdd253a370e11727e3041537afe1 Mon Sep 17 00:00:00 2001
From: Mekeor Melire <mekeor@posteo.de>
Date: Wed, 7 Feb 2024 23:00:08 +0100
Subject: [PATCH] Add option gnus-mode-line-logo
* lisp/gnus/gnus.el (gnus-mode-line-logo): New option specifying the
display of the Gnus logo image in the mode-line.
* etc/NEWS: Announce the change.
---
etc/NEWS | 4 ++++
lisp/gnus/gnus.el | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/etc/NEWS b/etc/NEWS
index ee7462cb2aa..b283717596c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1098,6 +1098,10 @@ The gmane.org website is, sadly, down since a number of
years with no
prospect of it coming back. Therefore, it is no longer valid to set
the user option 'nnweb-type' to 'gmane'.
+*** New user option 'gnus-mode-line-logo'.
+This allows the user to disable the display of the Gnus logo image in
+the mode-line.
+
** Rmail
---
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 99833e4eeca..7477828eb72 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -309,12 +309,18 @@ gnus-inhibit-startup-message
:group 'gnus-start
:type 'boolean)
+(defcustom gnus-mode-line-logo t
+ "If non-nil, Gnus-buffers display logo in mode-line, if applicable."
+ :group 'gnus-visual
+ :type 'boolean)
+
(defun gnus-mode-line-buffer-identification (line)
(let* ((str (car-safe line))
(str (if (stringp str)
(car (propertized-buffer-identification str))
str)))
- (if (or (not (fboundp 'find-image))
+ (if (or (not gnus-mode-line-logo)
+ (not (fboundp 'find-image))
(not (display-graphic-p))
(not (stringp str))
(not (string-match "^Gnus:" str)))
--
2.41.0
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#68985: [PATCH v3] Add option gnus-mode-line-logo |
Date: |
Fri, 09 Feb 2024 20:20:16 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Mekeor Melire <mekeor@posteo.de> writes:
> 2024-02-09 15:18 eric@ericabrahamsen.net:
>
>> Looks good! You've tested this, I assume?
>
> Yes.
>
> - Tested the customize interface.
> - Setting to nil works as documented.
> - Setting to another image spec works as documented.
> - As documented, in non-graphical displays (emacs -nw), no logo is
> displayed, just like before.
> - There are no byte-compilation warnings.
> - There are no new checkdoc warnings.
>
>> I think 'gnus-visual is the right group.
>
> Great!
>
>> Custom types are always a little frustrating, but this might work
>> better:
>>
>> '(choice
>> (repeat :tag "Image specs" (plist))
>> (const :tag "No logo" nil))
>
> This is great, too. Find attached another version of the patch which
> uses this custom-type, repeat-(plist).
Looks good! Thanks very much for the work. I've put the patch in. I'll
close the bug but it also occurred to me we didn't put anything in the
manual. I'll take a look at that and maybe follow up with another patch
later.
Thanks,
Eric
--- End Message ---