Add shr-link face for links.
authorTed Zlatanov <tzz@lifelogs.com>
Tue, 3 May 2011 14:25:11 +0000 (09:25 -0500)
committerTed Zlatanov <tzz@lifelogs.com>
Tue, 3 May 2011 14:25:11 +0000 (09:25 -0500)
* shr.el: Add shr-link face for links.
(shr-urlify): Use it.

lisp/ChangeLog
lisp/shr.el

index 82afd63..4bc2b4b 100644 (file)
@@ -1,5 +1,8 @@
 2011-05-03  Teodor Zlatanov  <tzz@lifelogs.com>
 
+       * shr.el: Add shr-link face for links.
+       (shr-urlify): Use it.
+
        * registry.el (registry-insert): Make error message more helpful.
 
 2011-05-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
index b2e4f1d..d865b2d 100644 (file)
@@ -91,6 +91,12 @@ cid: URL as the argument.")
   "Font for <s> elements."
   :group 'shr)
 
+(defface shr-link '((t (:underline t)
+                       (:foreground "yellow")
+                       (:background "black")))
+  "Font for <s> elements."
+  :group 'shr)
+
 ;;; Internal variables.
 
 (defvar shr-folding-mode nil)
@@ -591,6 +597,7 @@ START, and END.  Note that START and END should be merkers."
    :help-echo (if title (format "%s (%s)" url title) url)
    :keymap shr-map
    url)
+  (put-text-property start (point) 'face 'shr-link)
   (put-text-property start (point) 'shr-url url))
 
 (defun shr-encode-url (url)