diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/net/shr.el | 16 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8a0d5181bae..364511c2c15 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-12-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * net/shr.el (shr-fold-text): Don't bug out on zero-length text. | ||
| 4 | |||
| 1 | 2014-12-14 Alan Mackenzie <acm@muc.de> | 5 | 2014-12-14 Alan Mackenzie <acm@muc.de> |
| 2 | 6 | ||
| 3 | * lisp/cus-start.el (all): Add fast-but-imprecise-scrolling. | 7 | * lisp/cus-start.el (all): Add fast-but-imprecise-scrolling. |
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 6e06a76bf2a..387bb024a52 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -414,13 +414,15 @@ size, and full-buffer size." | |||
| 414 | (cdr (assq 'background-color shr-stylesheet)))))))) | 414 | (cdr (assq 'background-color shr-stylesheet)))))))) |
| 415 | 415 | ||
| 416 | (defun shr-fold-text (text) | 416 | (defun shr-fold-text (text) |
| 417 | (with-temp-buffer | 417 | (if (zerop (length text)) |
| 418 | (let ((shr-indentation 0) | 418 | text |
| 419 | (shr-state nil) | 419 | (with-temp-buffer |
| 420 | (shr-start nil) | 420 | (let ((shr-indentation 0) |
| 421 | (shr-internal-width (window-width))) | 421 | (shr-state nil) |
| 422 | (shr-insert text) | 422 | (shr-start nil) |
| 423 | (buffer-string)))) | 423 | (shr-internal-width (window-width))) |
| 424 | (shr-insert text) | ||
| 425 | (buffer-string))))) | ||
| 424 | 426 | ||
| 425 | (define-inline shr-char-breakable-p (char) | 427 | (define-inline shr-char-breakable-p (char) |
| 426 | "Return non-nil if a line can be broken before and after CHAR." | 428 | "Return non-nil if a line can be broken before and after CHAR." |