Subject: 27.0.50; Update eww and shr face spec syntax

From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 17 Apr 2018 20:36:31 +0100

>From ce4f67f185572f260bb14abc87cf532bcfedf7b3 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 17 Apr 2018 20:02:18 +0100
Subject: [PATCH 1/2] Modernize eww and shr face spec syntax

* lisp/net/eww.el (eww-form-text, eww-form-textarea):
* lisp/net/shr.el (shr-strike-through, shr-link, shr-selected-link):
Use (DISPLAY . PLIST) face spec syntax as recommended in
'(elisp) Defining Faces'.
---
 lisp/net/eww.el | 12 ++++++------
 lisp/net/shr.el |  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index f737189612..e74f661ac7 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -186,17 +186,17 @@ eww-form-select
   :group 'eww)
 
 (defface eww-form-text
-  '((t (:background "#505050"
-		    :foreground "white"
-		    :box (:line-width 1))))
+  '((t :background "#505050"
+       :foreground "white"
+       :box (:line-width 1)))
   "Face for eww text inputs."
   :version "24.4"
   :group 'eww)
 
 (defface eww-form-textarea
-  '((t (:background "#C0C0C0"
-		    :foreground "black"
-		    :box (:line-width 1))))
+  '((t :background "#C0C0C0"
+       :foreground "black"
+       :box (:line-width 1)))
   "Face for eww textarea inputs."
   :version "24.4"
   :group 'eww)
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 2d913a5a92..6ce2e59840 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -135,17 +135,17 @@ shr-content-function
 (defvar shr-put-image-function 'shr-put-image
   "Function called to put image and alt string.")
 
-(defface shr-strike-through '((t (:strike-through t)))
+(defface shr-strike-through '((t :strike-through t))
   "Font for <s> elements."
   :group 'shr)
 
 (defface shr-link
-  '((t (:inherit link)))
+  '((t :inherit link))
   "Font for link elements."
   :group 'shr)
 
 (defface shr-selected-link
-  '((t (:inherit shr-link :background "red")))
+  '((t :inherit shr-link :background "red"))
   "Font for link elements."
   :group 'shr)
 
-- 
2.17.0

>From dfb7a81f60853174e22735fa9246af8675a04ddc Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 17 Apr 2018 20:08:58 +0100
Subject: [PATCH 2/2] Set :version of shr faces

* lisp/net/shr.el (shr-strike-through, shr-link, shr-selected-link):
Set :version tag.
---
 lisp/net/shr.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 6ce2e59840..c549c8afb0 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -137,16 +137,19 @@ shr-put-image-function
 
 (defface shr-strike-through '((t :strike-through t))
   "Font for <s> elements."
+  :version "24.1"
   :group 'shr)
 
 (defface shr-link
   '((t :inherit link))
   "Font for link elements."
+  :version "24.1"
   :group 'shr)
 
 (defface shr-selected-link
   '((t :inherit shr-link :background "red"))
   "Font for link elements."
+  :version "27.1"
   :group 'shr)
 
 (defvar shr-inhibit-images nil
-- 
2.17.0

Further to Lars' invitation[1] in bug#25096, I attach two patches.  The
first updates eww and shr faces to use the newer (DISPLAY . PLIST) face
spec syntax, and the second sets the :version tag of shr faces.

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25096#48

P.S. I noticed that the docstrings of all three shr faces begin with the
     term "font".  Is this deviation from the term "face" intentional?

Thanks,

-- 
Basil

In GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-04-17 built on thunk
Repository revision: 62a075b01678c6a6f5d2a69c9ea6904a3927f1b4
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Debian GNU/Linux buster/sid