Commit dba6e3ec authored by Lars Ingebrigtsen's avatar Lars Ingebrigtsen
Browse files

Make shr-generic into a defsusbt to make the stack shallower

* net/shr.el (shr-generic): Make into a defsubst to make the stack
depth shallower.
parent 2f313daf
2014-01-31 Lars Ingebrigtsen <larsi@gnus.org>
* net/shr.el (shr-generic): Make into a defsubst to make the stack
depth shallower (bug#16587).
2014-01-31 Dmitry Gutov <dgutov@yandex.ru> 2014-01-31 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/ruby-mode.el (ruby-align-chained-calls): New option. * progmodes/ruby-mode.el (ruby-align-chained-calls): New option.
......
...@@ -359,6 +359,14 @@ size, and full-buffer size." ...@@ -359,6 +359,14 @@ size, and full-buffer size."
(push (shr-transform-dom sub) result))) (push (shr-transform-dom sub) result)))
(nreverse result))) (nreverse result)))
(defsubst shr-generic (cont)
(dolist (sub cont)
(cond
((eq (car sub) 'text)
(shr-insert (cdr sub)))
((listp (cdr sub))
(shr-descend sub)))))
(defun shr-descend (dom) (defun shr-descend (dom)
(let ((function (let ((function
(or (or
...@@ -392,14 +400,6 @@ size, and full-buffer size." ...@@ -392,14 +400,6 @@ size, and full-buffer size."
(cdr (assq 'color shr-stylesheet)) (cdr (assq 'color shr-stylesheet))
(cdr (assq 'background-color shr-stylesheet))))))) (cdr (assq 'background-color shr-stylesheet)))))))
(defun shr-generic (cont)
(dolist (sub cont)
(cond
((eq (car sub) 'text)
(shr-insert (cdr sub)))
((listp (cdr sub))
(shr-descend sub)))))
(defmacro shr-char-breakable-p (char) (defmacro shr-char-breakable-p (char)
"Return non-nil if a line can be broken before and after CHAR." "Return non-nil if a line can be broken before and after CHAR."
`(aref fill-find-break-point-function-table ,char)) `(aref fill-find-break-point-function-table ,char))
......
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