(shr-make-overlay): Obsolete function.
* eww.el (eww-put-color): Removed.
(eww-colorize-region): Use `add-face-text-property'.
2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * eww.el (eww-put-color): Removed.
+ (eww-colorize-region): Use `add-face-text-property'.
+
* shr.el (shr-add-font): Append face data, so that we get the correct
presedence: The innermost value (which is applied first) wins.
+ (shr-make-overlay): Obsolete function.
* mm-decode.el (mm-convert-shr-links): New function to convert
new-style shr URL links into widgets.
(let ((new-colors (shr-color-check fg bg)))
(when new-colors
(when fg
- (eww-put-color start end :foreground (cadr new-colors)))
+ (add-face-text-property start end
+ (list :foreground (cadr new-colors))))
(when bg
- (eww-put-color start end :background (car new-colors)))))))
-
-(defun eww-put-color (start end type color)
- (shr-put-color-1 start end type color))
+ (add-face-text-property start end
+ (list :background (car new-colors))))))))
(defun eww-display-raw (charset)
(let ((data (buffer-substring (point) (point-max))))
(dolist (type types)
(shr-add-font (or shr-start (point)) (point) type))))
-(defun shr-make-overlay (beg end &optional buffer front-advance rear-advance)
- (let ((overlay (make-overlay beg end buffer front-advance rear-advance)))
- (overlay-put overlay 'evaporate t)
- overlay))
-
;; Add face to the region, but avoid putting the font properties on
;; blank text at the start of the line, and the newline at the end, to
;; avoid ugliness.