Commit 10a5a054 authored by Lars Magne Ingebrigtsen's avatar Lars Magne Ingebrigtsen
Browse files

* lisp/net/shr.el (shr-tag-li): Speed up rendering pages with lots of <ul>

parent 65563fd7
2015-02-13 Lars Ingebrigtsen <larsi@gnus.org>
* net/shr.el (shr-tag-li): Speed up rendering pages with lots of
<ul>.
2015-02-12 Oleh Krehel <ohwoeowho@gmail.com> 2015-02-12 Oleh Krehel <ohwoeowho@gmail.com>
   
* progmodes/gdb-mi.el (gdb-display-io-nopopup): New defcustom. * progmodes/gdb-mi.el (gdb-display-io-nopopup): New defcustom.
......
...@@ -157,6 +157,7 @@ cid: URL as the argument.") ...@@ -157,6 +157,7 @@ cid: URL as the argument.")
(defvar shr-table-separator-pixel-width 0) (defvar shr-table-separator-pixel-width 0)
(defvar shr-table-id nil) (defvar shr-table-id nil)
(defvar shr-current-font nil) (defvar shr-current-font nil)
(defvar shr-internal-bullet nil)
(defvar shr-map (defvar shr-map
(let ((map (make-sparse-keymap))) (let ((map (make-sparse-keymap)))
...@@ -216,6 +217,8 @@ DOM should be a parse tree as generated by ...@@ -216,6 +217,8 @@ DOM should be a parse tree as generated by
(shr-table-id 0) (shr-table-id 0)
(shr-warning nil) (shr-warning nil)
(shr-table-separator-pixel-width (shr-string-pixel-width "-")) (shr-table-separator-pixel-width (shr-string-pixel-width "-"))
(shr-internal-bullet (cons shr-bullet
(shr-string-pixel-width shr-bullet)))
(shr-internal-width (or (and shr-width (shr-internal-width (or (and shr-width
(if (not shr-use-fonts) (if (not shr-use-fonts)
shr-width shr-width
...@@ -1408,11 +1411,13 @@ The preference is a float determined from `shr-prefer-media-type'." ...@@ -1408,11 +1411,13 @@ The preference is a float determined from `shr-prefer-media-type'."
(prog1 (prog1
(format "%d " shr-list-mode) (format "%d " shr-list-mode)
(setq shr-list-mode (1+ shr-list-mode))) (setq shr-list-mode (1+ shr-list-mode)))
shr-bullet))) (car shr-internal-bullet)))
(width (if (numberp shr-list-mode)
(shr-string-pixel-width bullet)
(cdr shr-internal-bullet))))
(insert bullet) (insert bullet)
(shr-mark-fill start) (shr-mark-fill start)
(let ((shr-indentation (+ shr-indentation (let ((shr-indentation (+ shr-indentation width)))
(shr-string-pixel-width bullet))))
(put-text-property start (1+ start) (put-text-property start (1+ start)
'shr-continuation-indentation shr-indentation) 'shr-continuation-indentation shr-indentation)
(put-text-property start (1+ start) 'shr-prefix-length (length bullet)) (put-text-property start (1+ start) 'shr-prefix-length (length bullet))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment