Commit 82a8ad04 authored by Miles Bader's avatar Miles Bader
Browse files

Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124

Merge from gnus--rel--5.10

Patches applied:

 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-27
   Update from CVS

2005-02-21  Reiner Steib  <Reiner.Steib@gmx.de>

   * lisp/gnus/gnus-art.el (gnus-parse-news-url, gnus-button-handle-news):
   Handle news URL with given port correctly.
parent 62bf2fd1
2005-02-21 Reiner Steib <Reiner.Steib@gmx.de>
* gnus-art.el (gnus-parse-news-url, gnus-button-handle-news):
Handle news URL with given port correctly.
2005-02-19 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-msg.el (gnus-copy-article-buffer): Quote decoded words
......
......@@ -6648,15 +6648,18 @@ specified by `gnus-button-alist'."
(cons fun args)))))))
(defun gnus-parse-news-url (url)
(let (scheme server group message-id articles)
(let (scheme server port group message-id articles)
(with-temp-buffer
(insert url)
(goto-char (point-min))
(when (looking-at "\\([A-Za-z]+\\):")
(setq scheme (match-string 1))
(goto-char (match-end 0)))
(when (looking-at "//\\([^/]+\\)/")
(when (looking-at "//\\([^:/]+\\)\\(:?\\)\\([0-9]+\\)?/")
(setq server (match-string 1))
(setq port (if (stringp (match-string 3))
(string-to-number (match-string 3))
(match-string 3)))
(goto-char (match-end 0)))
(cond
......@@ -6669,18 +6672,19 @@ specified by `gnus-button-alist'."
(setq group (match-string 1)))
(t
(error "Unknown news URL syntax"))))
(list scheme server group message-id articles)))
(list scheme server port group message-id articles)))
(defun gnus-button-handle-news (url)
"Fetch a news URL."
(destructuring-bind (scheme server group message-id articles)
(destructuring-bind (scheme server port group message-id articles)
(gnus-parse-news-url url)
(cond
(message-id
(save-excursion
(set-buffer gnus-summary-buffer)
(if server
(let ((gnus-refer-article-method (list (list 'nntp server))))
(let ((gnus-refer-article-method (list (list 'nntp server)))
(nntp-port-number (or port "nntp")))
(gnus-summary-refer-article message-id))
(gnus-summary-refer-article message-id))))
(group
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment