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 <>
* net/shr.el (shr-tag-li): Speed up rendering pages with lots of
2015-02-12 Oleh Krehel <>
* progmodes/gdb-mi.el (gdb-display-io-nopopup): New defcustom.
......@@ -157,6 +157,7 @@ cid: URL as the argument.")
(defvar shr-table-separator-pixel-width 0)
(defvar shr-table-id nil)
(defvar shr-current-font nil)
(defvar shr-internal-bullet nil)
(defvar shr-map
(let ((map (make-sparse-keymap)))
......@@ -216,6 +217,8 @@ DOM should be a parse tree as generated by
(shr-table-id 0)
(shr-warning nil)
(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
(if (not shr-use-fonts)
......@@ -1408,11 +1411,13 @@ The preference is a float determined from `shr-prefer-media-type'."
(format "%d " shr-list-mode)
(setq shr-list-mode (1+ shr-list-mode)))
(car shr-internal-bullet)))
(width (if (numberp shr-list-mode)
(shr-string-pixel-width bullet)
(cdr shr-internal-bullet))))
(insert bullet)
(shr-mark-fill start)
(let ((shr-indentation (+ shr-indentation
(shr-string-pixel-width bullet))))
(let ((shr-indentation (+ shr-indentation width)))
(put-text-property start (1+ start)
'shr-continuation-indentation shr-indentation)
(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