aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2010-10-02 10:30:06 +0000
committerKatsumi Yamaoka2010-10-02 10:30:06 +0000
commit367f7f81d1923c6418c4d5beb04144d3dbef476a (patch)
treef71d5e987039bdc73779bc5ed8f4a08c01faa41b
parent644d0594a55a5fd81efc40aa9cba0981a2563aa8 (diff)
downloademacs-367f7f81d1923c6418c4d5beb04144d3dbef476a.tar.gz
emacs-367f7f81d1923c6418c4d5beb04144d3dbef476a.zip
Merge changes made in Gnus trunk.
gnus-topic.el (gnus-topic-move-group): Fix the syntax of the completing read. gnus-html.el (gnus-html-schedule-image-fetching): Be silent. shr.el: New file.
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/gnus-html.el11
-rw-r--r--lisp/gnus/gnus-topic.el5
-rw-r--r--lisp/gnus/shr.el35
4 files changed, 54 insertions, 6 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 75651936bb0..3d32756418a 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,12 @@
12010-10-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * shr.el: New file.
4
5 * gnus-html.el (gnus-html-schedule-image-fetching): Be silent.
6
7 * gnus-topic.el (gnus-topic-move-group): Fix the syntax of the
8 completing read.
9
12010-10-01 Lars Magne Ingebrigtsen <larsi@gnus.org> 102010-10-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 11
3 * gnus-start.el (gnus-check-bogus-newsgroups): Say how many groups 12 * gnus-start.el (gnus-check-bogus-newsgroups): Say how many groups
diff --git a/lisp/gnus/gnus-html.el b/lisp/gnus/gnus-html.el
index fee9eee0f9e..0b64a237426 100644
--- a/lisp/gnus/gnus-html.el
+++ b/lisp/gnus/gnus-html.el
@@ -37,6 +37,7 @@
37(require 'url-cache) 37(require 'url-cache)
38(require 'xml) 38(require 'xml)
39(require 'browse-url) 39(require 'browse-url)
40(require 'help-fns)
40 41
41(defcustom gnus-html-image-cache-ttl (days-to-time 7) 42(defcustom gnus-html-image-cache-ttl (days-to-time 7)
42 "Time used to determine if we should use images from the cache." 43 "Time used to determine if we should use images from the cache."
@@ -368,10 +369,12 @@ Use ALT-TEXT for the image string."
368 "Retrieve IMAGE, and place it into BUFFER on arrival." 369 "Retrieve IMAGE, and place it into BUFFER on arrival."
369 (gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, image %s" 370 (gnus-message 8 "gnus-html-schedule-image-fetching: buffer %s, image %s"
370 buffer image) 371 buffer image)
371 (ignore-errors 372 (let ((args (list (car image)
372 (url-retrieve (car image) 373 'gnus-html-image-fetched
373 'gnus-html-image-fetched 374 (list buffer image))))
374 (list buffer image)))) 375 (when (> (length (help-function-arglist 'url-retrieve)) 4)
376 (setq args (nconc args (list t))))
377 (apply #'url-retrieve args)))
375 378
376(defun gnus-html-image-fetched (status buffer image) 379(defun gnus-html-image-fetched (status buffer image)
377 "Callback function called when image has been fetched." 380 "Callback function called when image has been fetched."
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index b600fac3533..efa543f68d6 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -1302,7 +1302,7 @@ If COPYP, copy the groups instead."
1302 (interactive 1302 (interactive
1303 (list current-prefix-arg 1303 (list current-prefix-arg
1304 (gnus-completing-read "Move to topic" (mapcar 'car gnus-topic-alist) t 1304 (gnus-completing-read "Move to topic" (mapcar 'car gnus-topic-alist) t
1305 'gnus-topic-history))) 1305 nil 'gnus-topic-history)))
1306 (let ((use-marked (and (not n) (not (gnus-region-active-p)) 1306 (let ((use-marked (and (not n) (not (gnus-region-active-p))
1307 gnus-group-marked t)) 1307 gnus-group-marked t))
1308 (groups (gnus-group-process-prefix n)) 1308 (groups (gnus-group-process-prefix n))
@@ -1348,7 +1348,8 @@ If COPYP, copy the groups instead."
1348 "Copy the current group to a topic." 1348 "Copy the current group to a topic."
1349 (interactive 1349 (interactive
1350 (list current-prefix-arg 1350 (list current-prefix-arg
1351 (gnus-completing-read "Copy to topic" (mapcar 'car gnus-topic-alist) t))) 1351 (gnus-completing-read
1352 "Copy to topic" (mapcar 'car gnus-topic-alist) t)))
1352 (gnus-topic-move-group n topic t)) 1353 (gnus-topic-move-group n topic t))
1353 1354
1354(defun gnus-topic-kill-group (&optional n discard) 1355(defun gnus-topic-kill-group (&optional n discard)
diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el
new file mode 100644
index 00000000000..407c253efae
--- /dev/null
+++ b/lisp/gnus/shr.el
@@ -0,0 +1,35 @@
1;;; shr.el --- Simple HTML Renderer
2
3;; Copyright (C) 2010 Free Software Foundation, Inc.
4
5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
6;; Keywords: html
7
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software: you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation, either version 3 of the License, or
13;; (at your option) any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22
23;;; Commentary:
24
25;; This package takes a HTML parse tree (as provided by
26;; libxml-parse-html-region) and renders it in the current buffer. It
27;; does not do CSS, JavaScript or anything advanced: It's geared
28;; towards rendering typical short snippets of HTML, like what you'd
29;; find in HTML email and the like.
30
31;;; Code:
32
33(provice 'shr)
34
35;;; shr.el ends here