summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2014-01-31 13:08:13 -0800
committerLars Ingebrigtsen <larsi@gnus.org>2014-01-31 13:08:13 -0800
commitdba6e3ec423212f5de4caf431d2e53c525f2c984 (patch)
treee807fc3355830ea01301f46e851bcf0b99697af7 /lisp
parent2f313daf4ad1b1c36423f15d085314600a2a8a12 (diff)
downloademacs-dba6e3ec423212f5de4caf431d2e53c525f2c984.tar.gz
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/shr.el16
2 files changed, 13 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 90c00963ad4..9b7e338e187 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 1491512087d..dba0f71bfe1 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -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))