aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2015-04-30 21:07:07 +0200
committerLars Magne Ingebrigtsen2015-05-01 15:24:16 +0200
commitdc332c12ffeea8d93b060b05ee8f97360076338b (patch)
tree6df0ace42be5c1d6df36ac8686e80373a1ecdbf8
parentc97f82750bbe811b5acffac635ba40154de3cd9e (diff)
downloademacs-dc332c12ffeea8d93b060b05ee8f97360076338b.tar.gz
emacs-dc332c12ffeea8d93b060b05ee8f97360076338b.zip
Fix links in tables in shr
* lisp/net/shr.el: Remove `shr-inhibit-decoration', because that makes (some) links in tables not work.
-rw-r--r--lisp/net/shr.el27
1 files changed, 11 insertions, 16 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 7763507734f..ec30d7e1856 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -152,7 +152,6 @@ cid: URL as the argument.")
152(defvar shr-ignore-cache nil) 152(defvar shr-ignore-cache nil)
153(defvar shr-external-rendering-functions nil) 153(defvar shr-external-rendering-functions nil)
154(defvar shr-target-id nil) 154(defvar shr-target-id nil)
155(defvar shr-inhibit-decoration nil)
156(defvar shr-table-separator-length 1) 155(defvar shr-table-separator-length 1)
157(defvar shr-table-separator-pixel-width 0) 156(defvar shr-table-separator-pixel-width 0)
158(defvar shr-table-id nil) 157(defvar shr-table-id nil)
@@ -783,16 +782,15 @@ size, and full-buffer size."
783;; blank text at the start of the line, and the newline at the end, to 782;; blank text at the start of the line, and the newline at the end, to
784;; avoid ugliness. 783;; avoid ugliness.
785(defun shr-add-font (start end type) 784(defun shr-add-font (start end type)
786 (unless shr-inhibit-decoration 785 (save-excursion
787 (save-excursion 786 (goto-char start)
788 (goto-char start) 787 (while (< (point) end)
789 (while (< (point) end) 788 (when (bolp)
790 (when (bolp) 789 (skip-chars-forward " "))
791 (skip-chars-forward " ")) 790 (add-face-text-property (point) (min (line-end-position) end) type t)
792 (add-face-text-property (point) (min (line-end-position) end) type t) 791 (if (< (line-end-position) end)
793 (if (< (line-end-position) end) 792 (forward-line 1)
794 (forward-line 1) 793 (goto-char end)))))
795 (goto-char end))))))
796 794
797(defun shr-mouse-browse-url (ev) 795(defun shr-mouse-browse-url (ev)
798 "Browse the URL under the mouse cursor." 796 "Browse the URL under the mouse cursor."
@@ -1041,8 +1039,7 @@ ones, in case fg and bg are nil."
1041 (shr-color-visible bg fg))))))) 1039 (shr-color-visible bg fg)))))))
1042 1040
1043(defun shr-colorize-region (start end fg &optional bg) 1041(defun shr-colorize-region (start end fg &optional bg)
1044 (when (and (not shr-inhibit-decoration) 1042 (when (or fg bg)
1045 (or fg bg))
1046 (let ((new-colors (shr-color-check fg bg))) 1043 (let ((new-colors (shr-color-check fg bg)))
1047 (when new-colors 1044 (when new-colors
1048 (when fg 1045 (when fg
@@ -1212,8 +1209,7 @@ ones, in case fg and bg are nil."
1212 (shr-ensure-newline) 1209 (shr-ensure-newline)
1213 (insert " ")) 1210 (insert " "))
1214 (put-text-property start (1+ start) 'shr-target-id shr-target-id)) 1211 (put-text-property start (1+ start) 'shr-target-id shr-target-id))
1215 (when (and url 1212 (when url
1216 (not shr-inhibit-decoration))
1217 (shr-urlify (or shr-start start) (shr-expand-url url) title)))) 1213 (shr-urlify (or shr-start start) (shr-expand-url url) title))))
1218 1214
1219(defun shr-tag-object (dom) 1215(defun shr-tag-object (dom)
@@ -1805,7 +1801,6 @@ The preference is a float determined from `shr-prefer-media-type'."
1805 1801
1806(defun shr-make-table-1 (dom widths &optional fill) 1802(defun shr-make-table-1 (dom widths &optional fill)
1807 (let ((trs nil) 1803 (let ((trs nil)
1808 (shr-inhibit-decoration (not fill))
1809 (rowspans (make-vector (length widths) 0)) 1804 (rowspans (make-vector (length widths) 0))
1810 (colspan-remaining 0) 1805 (colspan-remaining 0)
1811 colspan-width colspan-count 1806 colspan-width colspan-count