summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2010-09-14 23:14:44 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-09-14 23:14:44 +0000
commit01e80360d0b8390327ac30bbb37230970a7c1ddc (patch)
tree4e62078848ced825d97db8010c30af73351312d3 /lisp/gnus
parent3b59c3511cb74d944730b8156bbfd3bd7d8aa69f (diff)
downloademacs-01e80360d0b8390327ac30bbb37230970a7c1ddc.tar.gz
Merge changes made in Gnus trunk.
imap.el: Revert back to version cb950ed8ff3e0f40dac437a51b269166f9ffb60d, since some of the changes seem problematic. Fix up the w3m/curl dependencies. mm-decode.el (mm-text-html-renderer): Don't have gnus-article-html depend on curl, which isn't essential. gnus-html.el (gnus-html-schedule-image-fetching, gnus-html-prefetch-images): Check for curl before using it.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog12
-rw-r--r--lisp/gnus/gnus-html.el28
-rw-r--r--lisp/gnus/mm-decode.el4
3 files changed, 28 insertions, 16 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 7bb141ccfc0..8e2309f43a8 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-html.el (gnus-html-schedule-image-fetching)
+ (gnus-html-prefetch-images): Check for curl before using it.
+
+ * mm-decode.el (mm-text-html-renderer): Don't have gnus-article-html
+ depend on curl, which isn't essential.
+
+ * imap.el: Revert back to version
+ cb950ed8ff3e0f40dac437a51b269166f9ffb60d, since some of the changes
+ seem problematic.
+
2010-09-14 Juanma Barranquero <lekktu@gmail.com>
* gnus-registry.el (gnus-registry-install-shortcuts):
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index 8bfbaaa5279..ffa5ff1acdd 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -288,18 +288,19 @@ fit these criteria."
(defun gnus-html-schedule-image-fetching (buffer images)
(gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, images %s"
buffer images)
- (let* ((url (caar images))
- (process (start-process
- "images" nil "curl"
- "-s" "--create-dirs"
- "--location"
- "--max-time" "60"
- "-o" (gnus-html-image-id url)
- (mm-url-decode-entities-string url))))
- (process-kill-without-query process)
- (set-process-sentinel process 'gnus-html-curl-sentinel)
- (gnus-set-process-plist process (list 'images images
- 'buffer buffer))))
+ (when (executable-find "curl")
+ (let* ((url (caar images))
+ (process (start-process
+ "images" nil "curl"
+ "-s" "--create-dirs"
+ "--location"
+ "--max-time" "60"
+ "-o" (gnus-html-image-id url)
+ (mm-url-decode-entities-string url))))
+ (process-kill-without-query process)
+ (set-process-sentinel process 'gnus-html-curl-sentinel)
+ (gnus-set-process-plist process (list 'images images
+ 'buffer buffer)))))
(defun gnus-html-image-id (url)
(expand-file-name (sha1 url) gnus-html-cache-directory))
@@ -441,7 +442,8 @@ This only works if the article in question is HTML."
;;;###autoload
(defun gnus-html-prefetch-images (summary)
(let (blocked-images urls)
- (when (buffer-live-p summary)
+ (when (and (buffer-live-p summary)
+ (executable-find "curl"))
(with-current-buffer summary
(setq blocked-images gnus-blocked-images))
(save-match-data
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 725adcf559c..c4cbce4abaf 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -105,9 +105,7 @@
,disposition ,description ,cache ,id))
(defcustom mm-text-html-renderer
- (cond ((and (executable-find "w3m")
- (executable-find "curl"))
- 'gnus-article-html)
+ (cond ((executable-find "w3m") 'gnus-article-html)
((executable-find "links") 'links)
((executable-find "lynx") 'lynx)
((locate-library "w3") 'w3)