unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Visuwesh <visuweshm@gmail.com>
To: 57977@debbugs.gnu.org
Subject: bug#57977: 29.0.50; [PATCH] Make Gnus respect mode-line-buffer-identification-keymap
Date: Wed, 21 Sep 2022 18:13:54 +0530	[thread overview]
Message-ID: <8735ckdhit.fsf@gmail.com> (raw)
In-Reply-To: <877d1wdhmv.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 31 bytes --]

Please find attached, thanks.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Make-Gnus-respect-mode-line-buffer-identification-ke.patch --]
[-- Type: text/x-diff, Size: 2966 bytes --]

From 8f7938fb2cf08655144fedcc12e96ef2446022c7 Mon Sep 17 00:00:00 2001
From: Visuwesh <visuweshm@gmail.com>
Date: Wed, 21 Sep 2022 18:11:55 +0530
Subject: [PATCH] Make Gnus respect mode-line-buffer-identification-keymap

* lisp/gnus/gnus.el (gnus-mode-line-buffer-identification): Use
`propertized-buffer-identification' to set the keymap and to fontify
the buffer name.
* lisp/gnus/gnus-group.el (gnus-group-set-mode-line):
* lisp/gnus/gnus-sum.el (gnus-set-mode-line): Adjust calls to above.
* lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Fix missing
`gnus-mode-line-buffer-identification' call.
---
 lisp/gnus/gnus-group.el | 4 +---
 lisp/gnus/gnus-srvr.el  | 7 ++++---
 lisp/gnus/gnus-sum.el   | 3 +--
 lisp/gnus/gnus.el       | 2 +-
 4 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index fcad601d0c..7765bf296b 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1717,9 +1717,7 @@ gnus-group-set-mode-line
 	  (setq mode-string (substring mode-string 0 (- max-len 4))))
 	(prog1
 	    (setq mode-line-buffer-identification
-		  (gnus-mode-line-buffer-identification
-		   (list (propertize mode-string
-				     'face 'mode-line-buffer-id))))
+		  (gnus-mode-line-buffer-identification mode-string))
 	  (set-buffer-modified-p modified))))))
 
 (defun gnus-group-group-name ()
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index e659a648e1..315381a6dd 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -829,9 +829,10 @@ gnus-browse-foreign-server
 	  (erase-buffer))
 	(gnus-browse-mode)
 	(setq mode-line-buffer-identification
-	      (list
-	       (format
-		"Gnus: %%b {%s:%s}" (car method) (cadr method))))
+	      (gnus-mode-line-buffer-identification
+               (list
+	        (format
+		 "Gnus: %%b {%s:%s}" (car method) (cadr method)))))
 	(let ((buffer-read-only nil)
 	      name
 	      (prefix (let ((gnus-select-method orig-select-method))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index dde60caee7..107ad8fd4a 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -6207,8 +6207,7 @@ gnus-set-mode-line
       ;; Update the mode line.
       (setq mode-line-buffer-identification
 	    (gnus-mode-line-buffer-identification
-	     (list (propertize mode-string
-			       'face 'mode-line-buffer-id))))
+	     (list mode-string)))
       (set-buffer-modified-p t))))
 
 (defun gnus-create-xref-hashtb (from-newsgroup headers unreads)
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 0afd873a5d..3b1a336c83 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -331,7 +331,7 @@ gnus-mode-line-buffer-identification
 			   "This is %s, %s."
 			   gnus-version (gnus-emacs-version)))
 	 str)
-	(list str)))))
+	(list (propertized-buffer-identification str))))))
 
 ;; We define these group faces here to avoid the display
 ;; update forced when creating new faces.
-- 
2.35.1


  reply	other threads:[~2022-09-21 12:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 12:41 bug#57977: 29.0.50; [PATCH] Make Gnus respect mode-line-buffer-identification-keymap Visuwesh
2022-09-21 12:43 ` Visuwesh [this message]
2022-09-21 12:50   ` Visuwesh
2022-09-23 11:43     ` Visuwesh
2022-09-23 16:22       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735ckdhit.fsf@gmail.com \
    --to=visuweshm@gmail.com \
    --cc=57977@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).