1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-16 09:50:25 +00:00

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.
This commit is contained in:
Lars Ingebrigtsen 2014-01-31 13:08:13 -08:00
parent 2f313daf4a
commit dba6e3ec42
2 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,8 @@
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>
* progmodes/ruby-mode.el (ruby-align-chained-calls): New option.

View File

@ -359,6 +359,14 @@ size, and full-buffer size."
(push (shr-transform-dom sub) 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)
(let ((function
(or
@ -392,14 +400,6 @@ size, and full-buffer size."
(cdr (assq '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)
"Return non-nil if a line can be broken before and after CHAR."
`(aref fill-find-break-point-function-table ,char))