[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master dc01b99 3/3: Make the eww header work again even if the title is
From: |
Lars Ingebrigtsen |
Subject: |
master dc01b99 3/3: Make the eww header work again even if the title is nil |
Date: |
Sun, 13 Sep 2020 11:06:44 -0400 (EDT) |
branch: master
commit dc01b992e27e91631e67bb94f32c23275f1eacfd
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Make the eww header work again even if the title is nil
* lisp/net/eww.el (eww-update-header-line-format): Don't bug out
if the title isn't set at all.
---
lisp/net/eww.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 5fd4490..69dc2d4 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -729,14 +729,15 @@ Currently this means either text/html or
application/xhtml+xml."
(defun eww-update-header-line-format ()
(setq header-line-format
(and eww-header-line-format
- (let ((title (propertize (plist-get eww-data :title)
- 'face 'variable-pitch))
- (peer (plist-get eww-data :peer))
+ (let ((peer (plist-get eww-data :peer))
(url (propertize (plist-get eww-data :url)
- 'face 'variable-pitch)))
- (when (zerop (length title))
- (setq title (propertize "[untitled]" 'face 'variable-pitch)))
- ;; This connection has is https.
+ 'face 'variable-pitch))
+ (title (propertize
+ (if (zerop (length (plist-get eww-data :title)))
+ "[untitled]"
+ (plist-get eww-data :title))
+ 'face 'variable-pitch)))
+ ;; This connection is https.
(when peer
(add-face-text-property 0 (length title)
(if (plist-get peer :warnings)