mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08: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:
parent
2f313daf4a
commit
dba6e3ec42
2 changed files with 13 additions and 8 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue