[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/with-url 3ee6d63 3/8: Rework for with-url
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] scratch/with-url 3ee6d63 3/8: Rework for with-url |
Date: |
Sun, 22 Jan 2017 00:29:33 +0000 (UTC) |
branch: scratch/with-url
commit 3ee6d6304183ad9d1caa0069b22f2508169a32a8
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Rework for with-url
---
lisp/gnus/gnus-html.el | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index afbb845..f3d3067 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -378,20 +378,14 @@ Use ALT-TEXT for the image string."
'gnus-html-image-fetched
(list buffer image) t t))
-(defun gnus-html-image-fetched (status buffer image)
+(defun gnus-html-image-fetched (buffer image)
"Callback function called when image has been fetched."
- (unless (plist-get status :error)
- (when (and (or (search-forward "\n\n" nil t)
- (search-forward "\r\n\r\n" nil t))
- (not (eobp)))
- (when gnus-html-image-automatic-caching
- (url-store-in-cache (current-buffer)))
- (when (buffer-live-p buffer)
- (let ((data (buffer-substring (point) (point-max))))
- (with-current-buffer buffer
- (let ((inhibit-read-only t))
- (gnus-html-put-image data (car image) (cadr image))))))))
- (kill-buffer (current-buffer)))
+ (unless (url-errorp)
+ (when (buffer-live-p buffer)
+ (let ((data (buffer-substring (point) (point-max))))
+ (with-current-buffer buffer
+ (let ((inhibit-read-only t))
+ (gnus-html-put-image data (car image) (cadr image))))))))
(defun gnus-html-get-image-data (url)
"Get image data for URL.
- [Emacs-diffs] scratch/with-url updated (f74e07b -> 9d2e1e3), Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url dbc317f 2/8: Fix syntax error in with-url rework, Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url 5bd8812 4/8: Make :wait case actually work., Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url 495cb41 1/8: Handle the case where the peer drops connection with no Content-Length, Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url 3ee6d63 3/8: Rework for with-url,
Lars Ingebrigtsen <=
- [Emacs-diffs] scratch/with-url 724b285 6/8: Always kill the buffer, even when ignoring errors, Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url be65731 7/8: Allow specifying that redirects should not be followed, Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url 8ff9bd5 5/8: Remove unused parameter, Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url 9d2e1e3 8/8: Increase timeouts not that progress is more ensured, Lars Ingebrigtsen, 2017/01/21