+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.
(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."