diff options
| author | Lars Ingebrigtsen | 2019-09-27 00:33:40 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-09-27 00:33:45 +0200 |
| commit | 8e36ddfd44488e5194d26b34ad7405f92f838767 (patch) | |
| tree | 9da951074514431271c832fb1ca8d584a7f47125 | |
| parent | 45727c4e6de7f6f6f61a4ae3589d5dd271ea8803 (diff) | |
| download | emacs-8e36ddfd44488e5194d26b34ad7405f92f838767.tar.gz emacs-8e36ddfd44488e5194d26b34ad7405f92f838767.zip | |
Don't hard-code the RSS structure so much in nnrss
* lisp/gnus/nnrss.el (nnrss-get-namespace-prefix): Find the URL in
any section in the RSS (bug#34685).
| -rw-r--r-- | lisp/gnus/nnrss.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 955432764e6..1eca46220f1 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | (require 'iso8601) | 39 | (require 'iso8601) |
| 40 | (require 'mml) | 40 | (require 'mml) |
| 41 | (require 'xml) | 41 | (require 'xml) |
| 42 | (require 'dom) | ||
| 42 | 43 | ||
| 43 | (defgroup nnrss nil | 44 | (defgroup nnrss nil |
| 44 | "RSS access for Gnus." | 45 | "RSS access for Gnus." |
| @@ -1008,7 +1009,11 @@ Simply ensures that the first element is rss or rdf." | |||
| 1008 | "Given EL (containing a parsed element) and URI (containing a string | 1009 | "Given EL (containing a parsed element) and URI (containing a string |
| 1009 | that gives the URI for which you want to retrieve the namespace | 1010 | that gives the URI for which you want to retrieve the namespace |
| 1010 | prefix), return the prefix." | 1011 | prefix), return the prefix." |
| 1011 | (let* ((prefix (car (rassoc uri (cadar el)))) | 1012 | (let* ((prefix (car (rassoc uri (dom-attributes |
| 1013 | (dom-search | ||
| 1014 | el | ||
| 1015 | (lambda (node) | ||
| 1016 | (rassoc uri (dom-attributes node)))))))) | ||
| 1012 | (nslist (if prefix | 1017 | (nslist (if prefix |
| 1013 | (split-string (symbol-name prefix) ":"))) | 1018 | (split-string (symbol-name prefix) ":"))) |
| 1014 | (ns (cond ((eq (length nslist) 1) ; no prefix given | 1019 | (ns (cond ((eq (length nslist) 1) ; no prefix given |