Mercurial > emacs
comparison lisp/gnus/nnrss.el @ 110026:478f066057b8
gnus-summary-idna-message, nnrss-normalize-date, nnrss-discover-feed: Hyperlink urls in docstrings with URL `...' by Kevin Ryde <user42@zip.com.au>.
2009-07-16 Kevin Ryde <user42@zip.com.au> (tiny change)
* gnus-sum.el (gnus-summary-idna-message):
* nnrss.el (nnrss-normalize-date, nnrss-discover-feed):
Hyperlink urls in docstrings with URL `...'.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Mon, 30 Aug 2010 06:21:33 +0000 |
parents | d835100c3e8b |
children | 8d09094063d0 |
comparison
equal
deleted
inserted
replaced
110025:5f352fd4346a | 110026:478f066057b8 |
---|---|
496 (autoload 'timezone-parse-date "timezone") | 496 (autoload 'timezone-parse-date "timezone") |
497 | 497 |
498 (defun nnrss-normalize-date (date) | 498 (defun nnrss-normalize-date (date) |
499 "Return a date string of DATE in the RFC822 style. | 499 "Return a date string of DATE in the RFC822 style. |
500 This function handles the ISO 8601 date format described in | 500 This function handles the ISO 8601 date format described in |
501 <URL:http://www.w3.org/TR/NOTE-datetime>, and also the RFC822 style | 501 URL `http://www.w3.org/TR/NOTE-datetime', and also the RFC822 style |
502 which RSS 2.0 allows." | 502 which RSS 2.0 allows." |
503 (let (case-fold-search vector year month day time zone cts given) | 503 (let (case-fold-search vector year month day time zone cts given) |
504 (cond ((null date)) ; do nothing for this case | 504 (cond ((null date)) ; do nothing for this case |
505 ;; if the date is just digits (unix time stamp): | 505 ;; if the date is just digits (unix time stamp): |
506 ((string-match "^[0-9]+$" date) | 506 ((string-match "^[0-9]+$" date) |
1010 rss-offsite-end rdf-offsite-end xml-offsite-end | 1010 rss-offsite-end rdf-offsite-end xml-offsite-end |
1011 rss-offsite-in rdf-offsite-in xml-offsite-in))) | 1011 rss-offsite-in rdf-offsite-in xml-offsite-in))) |
1012 | 1012 |
1013 (defun nnrss-discover-feed (url) | 1013 (defun nnrss-discover-feed (url) |
1014 "Given a page, find an RSS feed using Mark Pilgrim's | 1014 "Given a page, find an RSS feed using Mark Pilgrim's |
1015 `ultra-liberal rss locator' (http://diveintomark.org/2002/08/15.html)." | 1015 `ultra-liberal rss locator' (URL `http://diveintomark.org/2002/08/15.html')." |
1016 | 1016 |
1017 (let ((parsed-page (nnrss-fetch url))) | 1017 (let ((parsed-page (nnrss-fetch url))) |
1018 | 1018 |
1019 ;; 1. if this url is the rss, use it. | 1019 ;; 1. if this url is the rss, use it. |
1020 (if (nnrss-rss-p parsed-page) | 1020 (if (nnrss-rss-p parsed-page) |