aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2012-02-08 01:44:25 +0000
committerKatsumi Yamaoka2012-02-08 01:44:25 +0000
commit038b34955729c97dce477654802d5b13a90bf8a2 (patch)
tree85e9dda8346d6c221eb0f50115e1895a38e29f06
parentaacaa4191173ca6d1aea3fd4ebb01ea1d5e46e7b (diff)
downloademacs-038b34955729c97dce477654802d5b13a90bf8a2.tar.gz
emacs-038b34955729c97dce477654802d5b13a90bf8a2.zip
Merge changes made in No Gnus
shr.el: Inhibit getting and sending cookies when fetching pictures. gnus-html.el (gnus-html-schedule-image-fetching): Ditto.
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/gnus-html.el2
-rw-r--r--lisp/gnus/shr.el17
3 files changed, 15 insertions, 10 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 827ccc730db..d6631ac2ce1 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
12012-02-08 Lars Ingebrigtsen <larsi@gnus.org>
2
3 * shr.el: Inhibit getting and sending cookies when fetching pictures.
4
5 * gnus-html.el (gnus-html-schedule-image-fetching): Ditto.
6
12012-02-07 Lars Ingebrigtsen <larsi@gnus.org> 72012-02-07 Lars Ingebrigtsen <larsi@gnus.org>
2 8
3 * shr.el (shr-remove-trailing-whitespace): Don't strip whitespace from 9 * shr.el (shr-remove-trailing-whitespace): Don't strip whitespace from
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index 5bbb9e10e04..770904fa1c4 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -390,7 +390,7 @@ Use ALT-TEXT for the image string."
390 (if (fboundp 'url-queue-retrieve) 390 (if (fboundp 'url-queue-retrieve)
391 (url-queue-retrieve (car image) 391 (url-queue-retrieve (car image)
392 'gnus-html-image-fetched 392 'gnus-html-image-fetched
393 (list buffer image) t) 393 (list buffer image) t t)
394 (ignore-errors 394 (ignore-errors
395 (url-retrieve (car image) 395 (url-retrieve (car image)
396 'gnus-html-image-fetched 396 'gnus-html-image-fetched
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
index 7af8e31f792..386c9c62b67 100644
--- a/lisp/gnus/shr.el
+++ b/lisp/gnus/shr.el
@@ -188,7 +188,8 @@ redirects somewhere else."
188 (when (re-search-forward ".utm_.*" nil t) 188 (when (re-search-forward ".utm_.*" nil t)
189 (replace-match "" t t)) 189 (replace-match "" t t))
190 (message "Copied %s" (buffer-string)) 190 (message "Copied %s" (buffer-string))
191 (copy-region-as-kill (point-min) (point-max))))))) 191 (copy-region-as-kill (point-min) (point-max)))))
192 nil t))
192 ;; Copy the URL to the kill ring. 193 ;; Copy the URL to the kill ring.
193 (t 194 (t
194 (with-temp-buffer 195 (with-temp-buffer
@@ -231,7 +232,7 @@ the URL of the image to the kill buffer instead."
231 (message "Inserting %s..." url) 232 (message "Inserting %s..." url)
232 (url-retrieve url 'shr-image-fetched 233 (url-retrieve url 'shr-image-fetched
233 (list (current-buffer) (1- (point)) (point-marker)) 234 (list (current-buffer) (1- (point)) (point-marker))
234 t)))) 235 t t))))
235 236
236;;; Utility functions. 237;;; Utility functions.
237 238
@@ -510,7 +511,8 @@ the URL of the image to the kill buffer instead."
510 (if (not url) 511 (if (not url)
511 (message "No link under point") 512 (message "No link under point")
512 (url-retrieve (shr-encode-url url) 513 (url-retrieve (shr-encode-url url)
513 'shr-store-contents (list url directory))))) 514 'shr-store-contents (list url directory)
515 nil t))))
514 516
515(defun shr-store-contents (status url directory) 517(defun shr-store-contents (status url directory)
516 (unless (plist-get status :error) 518 (unless (plist-get status :error)
@@ -617,7 +619,7 @@ START, and END. Note that START and END should be markers."
617 (delete-region (point) end)))) 619 (delete-region (point) end))))
618 (url-retrieve url 'shr-image-fetched 620 (url-retrieve url 'shr-image-fetched
619 (list (current-buffer) start end) 621 (list (current-buffer) start end)
620 t))))) 622 t t)))))
621 623
622(defun shr-heading (cont &rest types) 624(defun shr-heading (cont &rest types)
623 (shr-ensure-paragraph) 625 (shr-ensure-paragraph)
@@ -927,13 +929,10 @@ ones, in case fg and bg are nil."
927 (let ((file (url-cache-create-filename (shr-encode-url url)))) 929 (let ((file (url-cache-create-filename (shr-encode-url url))))
928 (when (file-exists-p file) 930 (when (file-exists-p file)
929 (delete-file file)))) 931 (delete-file file))))
930 (funcall 932 (url-queue-retrieve
931 (if (fboundp 'url-queue-retrieve)
932 'url-queue-retrieve
933 'url-retrieve)
934 (shr-encode-url url) 'shr-image-fetched 933 (shr-encode-url url) 'shr-image-fetched
935 (list (current-buffer) start (set-marker (make-marker) (1- (point)))) 934 (list (current-buffer) start (set-marker (make-marker) (1- (point))))
936 t))) 935 t t)))
937 (when (zerop shr-table-depth) ;; We are not in a table. 936 (when (zerop shr-table-depth) ;; We are not in a table.
938 (put-text-property start (point) 'keymap shr-map) 937 (put-text-property start (point) 'keymap shr-map)
939 (put-text-property start (point) 'shr-alt alt) 938 (put-text-property start (point) 'shr-alt alt)