aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2015-02-13 15:51:23 +1100
committerLars Magne Ingebrigtsen2015-02-13 15:51:23 +1100
commit10a5a054ac7b1767623ed7e7f3ff5d7ae4ffe906 (patch)
tree99e4d0cab29e60076cf4c734add1a08fd8e20e94
parent65563fd7714271582d5146c09202c0f7a0631fe5 (diff)
downloademacs-10a5a054ac7b1767623ed7e7f3ff5d7ae4ffe906.tar.gz
emacs-10a5a054ac7b1767623ed7e7f3ff5d7ae4ffe906.zip
* lisp/net/shr.el (shr-tag-li): Speed up rendering pages with lots of <ul>
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/shr.el11
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ff2755df630..8393009c061 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12015-02-13 Lars Ingebrigtsen <larsi@gnus.org>
2
3 * net/shr.el (shr-tag-li): Speed up rendering pages with lots of
4 <ul>.
5
12015-02-12 Oleh Krehel <ohwoeowho@gmail.com> 62015-02-12 Oleh Krehel <ohwoeowho@gmail.com>
2 7
3 * progmodes/gdb-mi.el (gdb-display-io-nopopup): New defcustom. 8 * progmodes/gdb-mi.el (gdb-display-io-nopopup): New defcustom.
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index cf35a1287d6..f6a390e4d0a 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -157,6 +157,7 @@ cid: URL as the argument.")
157(defvar shr-table-separator-pixel-width 0) 157(defvar shr-table-separator-pixel-width 0)
158(defvar shr-table-id nil) 158(defvar shr-table-id nil)
159(defvar shr-current-font nil) 159(defvar shr-current-font nil)
160(defvar shr-internal-bullet nil)
160 161
161(defvar shr-map 162(defvar shr-map
162 (let ((map (make-sparse-keymap))) 163 (let ((map (make-sparse-keymap)))
@@ -216,6 +217,8 @@ DOM should be a parse tree as generated by
216 (shr-table-id 0) 217 (shr-table-id 0)
217 (shr-warning nil) 218 (shr-warning nil)
218 (shr-table-separator-pixel-width (shr-string-pixel-width "-")) 219 (shr-table-separator-pixel-width (shr-string-pixel-width "-"))
220 (shr-internal-bullet (cons shr-bullet
221 (shr-string-pixel-width shr-bullet)))
219 (shr-internal-width (or (and shr-width 222 (shr-internal-width (or (and shr-width
220 (if (not shr-use-fonts) 223 (if (not shr-use-fonts)
221 shr-width 224 shr-width
@@ -1408,11 +1411,13 @@ The preference is a float determined from `shr-prefer-media-type'."
1408 (prog1 1411 (prog1
1409 (format "%d " shr-list-mode) 1412 (format "%d " shr-list-mode)
1410 (setq shr-list-mode (1+ shr-list-mode))) 1413 (setq shr-list-mode (1+ shr-list-mode)))
1411 shr-bullet))) 1414 (car shr-internal-bullet)))
1415 (width (if (numberp shr-list-mode)
1416 (shr-string-pixel-width bullet)
1417 (cdr shr-internal-bullet))))
1412 (insert bullet) 1418 (insert bullet)
1413 (shr-mark-fill start) 1419 (shr-mark-fill start)
1414 (let ((shr-indentation (+ shr-indentation 1420 (let ((shr-indentation (+ shr-indentation width)))
1415 (shr-string-pixel-width bullet))))
1416 (put-text-property start (1+ start) 1421 (put-text-property start (1+ start)
1417 'shr-continuation-indentation shr-indentation) 1422 'shr-continuation-indentation shr-indentation)
1418 (put-text-property start (1+ start) 'shr-prefix-length (length bullet)) 1423 (put-text-property start (1+ start) 'shr-prefix-length (length bullet))