emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master c4dce04: lisp/net/shr.el (shr-tag-del, shr-tag-ins)


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master c4dce04: lisp/net/shr.el (shr-tag-del, shr-tag-ins): New functions.
Date: Sun, 07 Feb 2016 02:12:13 +0000

branch: master
commit c4dce0494a94cc2bf128f72fec740fd89119caa0
Author: Adam Sjøgren <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    lisp/net/shr.el (shr-tag-del, shr-tag-ins): New functions.
    
    * lisp/net/shr.el (shr-tag-del, shr-tag-ins): New functions.
---
 lisp/net/shr.el |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index a8ba284..567c8b8 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1230,9 +1230,6 @@ ones, in case fg and bg are nil."
 (defun shr-tag-s (dom)
   (shr-fontize-dom dom 'shr-strike-through))
 
-(defun shr-tag-del (dom)
-  (shr-fontize-dom dom 'shr-strike-through))
-
 (defun shr-tag-b (dom)
   (shr-fontize-dom dom 'bold))
 
@@ -1252,6 +1249,24 @@ ones, in case fg and bg are nil."
   (let ((shr-current-font 'default))
     (shr-generic dom)))
 
+(defun shr-tag-ins (cont)
+  (let* ((start (point))
+         (color "green")
+         (shr-stylesheet (nconc (list (cons 'color color))
+                               shr-stylesheet)))
+    (shr-generic cont)
+    (shr-colorize-region start (point) color
+                         (cdr (assq 'background-color shr-stylesheet)))))
+
+(defun shr-tag-del (cont)
+  (let* ((start (point))
+         (color "red")
+         (shr-stylesheet (nconc (list (cons 'color color))
+                               shr-stylesheet)))
+    (shr-fontize-dom cont 'shr-strike-through)
+    (shr-colorize-region start (point) color
+                         (cdr (assq 'background-color shr-stylesheet)))))
+
 (defun shr-parse-style (style)
   (when style
     (save-match-data



reply via email to

[Prev in Thread] Current Thread [Next in Thread]