summaryrefslogtreecommitdiffhomepage
path: root/lib/eos
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-04-24 03:58:21 +0100
committerjao <jao@gnu.org>2022-04-24 03:58:21 +0100
commit9d7fbf9463fafc590c40e9503a1df55665c42ee7 (patch)
treecbb103b549bfe4860364fce53a8124efb3ddef64 /lib/eos
parent230470f0bd6b5cf070dd3d9b62d74e45e75235c7 (diff)
downloadelibs-9d7fbf9463fafc590c40e9503a1df55665c42ee7.tar.gz
elibs-9d7fbf9463fafc590c40e9503a1df55665c42ee7.tar.bz2
eww title in mode-line also in emacs 28
Diffstat (limited to 'lib/eos')
-rw-r--r--lib/eos/jao-mode-line.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/eos/jao-mode-line.el b/lib/eos/jao-mode-line.el
index 968ac35..0fd5a2e 100644
--- a/lib/eos/jao-mode-line.el
+++ b/lib/eos/jao-mode-line.el
@@ -71,6 +71,8 @@
("")
("%n %2c %l " (:eval (format "%d" (line-number-at-pos (point-max)))))))
+(defvar-local eww-data nil)
+
(defvar jao-mode-line--bid
'(:eval (cond ((derived-mode-p 'gnus-group-mode
'gnus-article-mode
@@ -78,6 +80,8 @@
mode-line-buffer-identification)
((derived-mode-p 'circe-channel-mode)
(format "%s [%d]" (buffer-name) (length (circe-channel-nicks))))
+ ((not (null eww-data))
+ (or (plist-get eww-data :title) "No title"))
(t "%b"))))
(defvar jao-mode-line--format