diff options
| author | Alan Mackenzie | 2014-12-15 12:07:18 +0000 |
|---|---|---|
| committer | Alan Mackenzie | 2014-12-15 12:07:18 +0000 |
| commit | 816c1dfc5dfc6d490c653b393ef6876b3f04b7fe (patch) | |
| tree | 8a1e18c725f6cb07a97f85769322e6089af4580c /lisp | |
| parent | 436b88bf9960c97f4588d8e3d9c0c353e7898792 (diff) | |
| parent | e2815bfe2a1e4d5a21d6b6378ebc2108d4d104ab (diff) | |
| download | emacs-816c1dfc5dfc6d490c653b393ef6876b3f04b7fe.tar.gz emacs-816c1dfc5dfc6d490c653b393ef6876b3f04b7fe.zip | |
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
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." |