emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 41d39ffc32: Make Gnus respect mode-line-buffer-identification-key


From: Lars Ingebrigtsen
Subject: master 41d39ffc32: Make Gnus respect mode-line-buffer-identification-keymap
Date: Fri, 23 Sep 2022 14:07:51 -0400 (EDT)

branch: master
commit 41d39ffc3269db33f35541c94ebf109ffb50681e
Author: Visuwesh <visuweshm@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make Gnus respect mode-line-buffer-identification-keymap
    
    * lisp/gnus/gnus-group.el (gnus-group-set-mode-line): Use
    'propertized-buffer-identification' to buttonise and fontify the
    buffer name.
    * lisp/gnus/gnus-sum.el (gnus-set-mode-line):
    * lisp/gnus/gnus.el (gnus-mode-line-buffer-identification): Adjust
    calls to above.
    * lisp/gnus/gnus-srvr.el (gnus-browse-foreign-server): Add missing
    'gnus-modeline-buffer-identification' call (bug#57977).
---
 lisp/gnus/gnus-group.el | 4 +---
 lisp/gnus/gnus-srvr.el  | 7 ++++---
 lisp/gnus/gnus-sum.el   | 3 +--
 lisp/gnus/gnus.el       | 7 +++++--
 4 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index fcad601d0c..d1098be6fd 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1717,9 +1717,7 @@ already.  If INFO-UNCHANGED is non-nil, dribble buffer is 
not updated."
          (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 (list 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 @@ claim them."
          (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 @@ If WHERE is `summary', the summary mode line format will 
be used."
       ;; 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..3a7edf9e08 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -310,12 +310,15 @@ be set in `.emacs' instead."
   :type 'boolean)
 
 (defun gnus-mode-line-buffer-identification (line)
-  (let ((str (car-safe line)))
+  (let* ((str (car-safe line))
+         (str (if (stringp str)
+                  (car (propertized-buffer-identification str))
+                str)))
     (if (or (not (fboundp 'find-image))
            (not (display-graphic-p))
            (not (stringp str))
            (not (string-match "^Gnus:" str)))
-       line
+       (list str)
       (let ((load-path (append (mm-image-load-path) load-path)))
        ;; Add the Gnus logo.
        (add-text-properties



reply via email to

[Prev in Thread] Current Thread [Next in Thread]