]> git.eshelyaron.com Git - emacs.git/commitdiff
Make Gnus respect mode-line-buffer-identification-keymap
authorVisuwesh <visuweshm@gmail.com>
Fri, 23 Sep 2022 16:21:55 +0000 (18:21 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Fri, 23 Sep 2022 16:21:55 +0000 (18:21 +0200)
* 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
lisp/gnus/gnus-srvr.el
lisp/gnus/gnus-sum.el
lisp/gnus/gnus.el

index fcad601d0c3f361618723a629d9cd770e5705f75..d1098be6fd3a305dc332636cd3f740ced56b12af 100644 (file)
@@ -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 ()
index e659a648e10f3137482544f81f0daea5618b091a..315381a6dd8c756eb4fb9f3b2e3968e760d9efab 100644 (file)
@@ -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))
index dde60caee7eb16b3b57f412071a86e423ed67117..107ad8fd4a8c2ffc9534875251dd66a042523da3 100644 (file)
@@ -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)
index 0afd873a5df5adcb7d5825a873f68736fea48a9b..3a7edf9e080e33a008e83d411b1c8a6b1929be32 100644 (file)
@@ -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