aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVisuwesh2022-09-23 18:21:55 +0200
committerLars Ingebrigtsen2022-09-23 18:21:55 +0200
commit41d39ffc3269db33f35541c94ebf109ffb50681e (patch)
treebb8ef7ddf7f0bc7d5eea15bbfa91784fb9dbef06
parentcf27fe0238f88e2aee972334be75962f438cfa94 (diff)
downloademacs-41d39ffc3269db33f35541c94ebf109ffb50681e.tar.gz
emacs-41d39ffc3269db33f35541c94ebf109ffb50681e.zip
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).
-rw-r--r--lisp/gnus/gnus-group.el4
-rw-r--r--lisp/gnus/gnus-srvr.el7
-rw-r--r--lisp/gnus/gnus-sum.el3
-rw-r--r--lisp/gnus/gnus.el7
4 files changed, 11 insertions, 10 deletions
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index fcad601d0c3..d1098be6fd3 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."
1717 (setq mode-string (substring mode-string 0 (- max-len 4)))) 1717 (setq mode-string (substring mode-string 0 (- max-len 4))))
1718 (prog1 1718 (prog1
1719 (setq mode-line-buffer-identification 1719 (setq mode-line-buffer-identification
1720 (gnus-mode-line-buffer-identification 1720 (gnus-mode-line-buffer-identification (list mode-string)))
1721 (list (propertize mode-string
1722 'face 'mode-line-buffer-id))))
1723 (set-buffer-modified-p modified)))))) 1721 (set-buffer-modified-p modified))))))
1724 1722
1725(defun gnus-group-group-name () 1723(defun gnus-group-group-name ()
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index e659a648e10..315381a6dd8 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -829,9 +829,10 @@ claim them."
829 (erase-buffer)) 829 (erase-buffer))
830 (gnus-browse-mode) 830 (gnus-browse-mode)
831 (setq mode-line-buffer-identification 831 (setq mode-line-buffer-identification
832 (list 832 (gnus-mode-line-buffer-identification
833 (format 833 (list
834 "Gnus: %%b {%s:%s}" (car method) (cadr method)))) 834 (format
835 "Gnus: %%b {%s:%s}" (car method) (cadr method)))))
835 (let ((buffer-read-only nil) 836 (let ((buffer-read-only nil)
836 name 837 name
837 (prefix (let ((gnus-select-method orig-select-method)) 838 (prefix (let ((gnus-select-method orig-select-method))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index dde60caee7e..107ad8fd4a8 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."
6207 ;; Update the mode line. 6207 ;; Update the mode line.
6208 (setq mode-line-buffer-identification 6208 (setq mode-line-buffer-identification
6209 (gnus-mode-line-buffer-identification 6209 (gnus-mode-line-buffer-identification
6210 (list (propertize mode-string 6210 (list mode-string)))
6211 'face 'mode-line-buffer-id))))
6212 (set-buffer-modified-p t)))) 6211 (set-buffer-modified-p t))))
6213 6212
6214(defun gnus-create-xref-hashtb (from-newsgroup headers unreads) 6213(defun gnus-create-xref-hashtb (from-newsgroup headers unreads)
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 0afd873a5df..3a7edf9e080 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -310,12 +310,15 @@ be set in `.emacs' instead."
310 :type 'boolean) 310 :type 'boolean)
311 311
312(defun gnus-mode-line-buffer-identification (line) 312(defun gnus-mode-line-buffer-identification (line)
313 (let ((str (car-safe line))) 313 (let* ((str (car-safe line))
314 (str (if (stringp str)
315 (car (propertized-buffer-identification str))
316 str)))
314 (if (or (not (fboundp 'find-image)) 317 (if (or (not (fboundp 'find-image))
315 (not (display-graphic-p)) 318 (not (display-graphic-p))
316 (not (stringp str)) 319 (not (stringp str))
317 (not (string-match "^Gnus:" str))) 320 (not (string-match "^Gnus:" str)))
318 line 321 (list str)
319 (let ((load-path (append (mm-image-load-path) load-path))) 322 (let ((load-path (append (mm-image-load-path) load-path)))
320 ;; Add the Gnus logo. 323 ;; Add the Gnus logo.
321 (add-text-properties 324 (add-text-properties