* net/shr.el (shr-fold-text): Don't bug out on zero-length text.

parent 37139317
2014-12-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
* net/shr.el (shr-fold-text): Don't bug out on zero-length text.
2014-12-14 Alan Mackenzie <acm@muc.de>
* lisp/cus-start.el (all): Add fast-but-imprecise-scrolling.
......
......@@ -414,13 +414,15 @@ size, and full-buffer size."
(cdr (assq 'background-color shr-stylesheet))))))))
(defun shr-fold-text (text)
(with-temp-buffer
(let ((shr-indentation 0)
(shr-state nil)
(shr-start nil)
(shr-internal-width (window-width)))
(shr-insert text)
(buffer-string))))
(if (zerop (length text))
text
(with-temp-buffer
(let ((shr-indentation 0)
(shr-state nil)
(shr-start nil)
(shr-internal-width (window-width)))
(shr-insert text)
(buffer-string)))))
(define-inline shr-char-breakable-p (char)
"Return non-nil if a line can be broken before and after 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