aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2013-08-01 11:23:38 +0000
committerKatsumi Yamaoka2013-08-01 11:23:38 +0000
commit51457e0080c982a1760dcf75a84dba923dc37f01 (patch)
tree11059e179943230c83a847f366316ff0dbed9cc3
parenta43dc4243c667d2033a9e7fe5cc1d499b35a1651 (diff)
downloademacs-51457e0080c982a1760dcf75a84dba923dc37f01.tar.gz
emacs-51457e0080c982a1760dcf75a84dba923dc37f01.zip
lisp/gnus/nnrss.el (nnrss-discover-feed): Indent
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/nnrss.el36
2 files changed, 22 insertions, 18 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index afb8ee8f6e2..dd00eebe6f3 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12013-08-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * nnrss.el (nnrss-discover-feed): Indent.
4
12013-08-01 Katsumi Yamaoka <yamaoka@jpl.org> 52013-08-01 Katsumi Yamaoka <yamaoka@jpl.org>
2 6
3 * gnus-util.el (gnus-emacs-completing-read): Isolate XEmacs stuff. 7 * gnus-util.el (gnus-emacs-completing-read): Isolate XEmacs stuff.
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el
index b1e5c4cc9fd..80bb7c4f7df 100644
--- a/lisp/gnus/nnrss.el
+++ b/lisp/gnus/nnrss.el
@@ -933,30 +933,30 @@ whether they are `offsite' or `onsite'."
933 rss-offsite-in rdf-offsite-in xml-offsite-in))) 933 rss-offsite-in rdf-offsite-in xml-offsite-in)))
934 934
935(defun nnrss-discover-feed (url) 935(defun nnrss-discover-feed (url)
936 "Given a page, find an RSS feed using Mark Pilgrim's 936 "Given a page, find an RSS feed.
937`ultra-liberal rss locator'." 937Use Mark Pilgrim's `ultra-liberal rss locator'."
938
939 (let ((parsed-page (nnrss-fetch url))) 938 (let ((parsed-page (nnrss-fetch url)))
940 939 ;; 1. if this url is the rss, use it.
941;; 1. if this url is the rss, use it.
942 (if (nnrss-rss-p parsed-page) 940 (if (nnrss-rss-p parsed-page)
943 (let ((rss-ns (nnrss-get-namespace-prefix parsed-page "http://purl.org/rss/1.0/"))) 941 (let ((rss-ns (nnrss-get-namespace-prefix parsed-page "http://purl.org/rss/1.0/")))
944 (nnrss-rss-title-description rss-ns parsed-page url)) 942 (nnrss-rss-title-description rss-ns parsed-page url))
945 943
946;; 2. look for the <link rel="alternate" 944 ;; 2. look for the <link rel="alternate"
947;; type="application/rss+xml" and use that if it is there. 945 ;; type="application/rss+xml" and use that if it is there.
948 (let ((links (nnrss-get-rsslinks parsed-page))) 946 (let ((links (nnrss-get-rsslinks parsed-page)))
949 (if links 947 (if links
950 (let* ((xml (nnrss-fetch 948 (let* ((xml (nnrss-fetch
951 (cdr (assoc 'href (cadar links))))) 949 (cdr (assoc 'href (cadar links)))))
952 (rss-ns (nnrss-get-namespace-prefix xml "http://purl.org/rss/1.0/"))) 950 (rss-ns (nnrss-get-namespace-prefix
953 (nnrss-rss-title-description rss-ns xml (cdr (assoc 'href (cadar links))))) 951 xml "http://purl.org/rss/1.0/")))
954 952 (nnrss-rss-title-description
955;; 3. look for links on the site in the following order: 953 rss-ns xml (cdr (assoc 'href (cadar links)))))
956;; - onsite links ending in .rss, .rdf, or .xml 954
957;; - onsite links containing any of the above 955 ;; 3. look for links on the site in the following order:
958;; - offsite links ending in .rss, .rdf, or .xml 956 ;; - onsite links ending in .rss, .rdf, or .xml
959;; - offsite links containing any of the above 957 ;; - onsite links containing any of the above
958 ;; - offsite links ending in .rss, .rdf, or .xml
959 ;; - offsite links containing any of the above
960 (let* ((base-uri (progn (string-match ".*://[^/]+/?" url) 960 (let* ((base-uri (progn (string-match ".*://[^/]+/?" url)
961 (match-string 0 url))) 961 (match-string 0 url)))
962 (hrefs (nnrss-order-hrefs 962 (hrefs (nnrss-order-hrefs
@@ -969,9 +969,9 @@ whether they are `offsite' or `onsite'."
969 (setq rss-link (nnrss-rss-title-description 969 (setq rss-link (nnrss-rss-title-description
970 rss-ns href-data (car hrefs)))) 970 rss-ns href-data (car hrefs))))
971 (setq hrefs (cdr hrefs))))) 971 (setq hrefs (cdr hrefs)))))
972 (if rss-link rss-link 972 (if rss-link
973 973 rss-link
974;; 4. check syndic8 974 ;; 4. check syndic8
975 (nnrss-find-rss-via-syndic8 url)))))))) 975 (nnrss-find-rss-via-syndic8 url))))))))
976 976
977(defun nnrss-find-rss-via-syndic8 (url) 977(defun nnrss-find-rss-via-syndic8 (url)