# HG changeset patch # User Miles Bader # Date 1109114111 0 # Node ID a2c5c861962ae0aee9437d12b1c6d893c1d83061 # Parent 7cc86e0f08f695e405cddefd8a38f9c42d7ecbcb 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 * lisp/gnus/gnus-art.el (gnus-parse-news-url, gnus-button-handle-news): Handle news URL with given port correctly. diff -r 7cc86e0f08f6 -r a2c5c861962a lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Tue Feb 22 23:12:15 2005 +0000 +++ b/lisp/gnus/ChangeLog Tue Feb 22 23:15:11 2005 +0000 @@ -1,3 +1,8 @@ +2005-02-21 Reiner Steib + + * gnus-art.el (gnus-parse-news-url, gnus-button-handle-news): + Handle news URL with given port correctly. + 2005-02-19 Katsumi Yamaoka * gnus-msg.el (gnus-copy-article-buffer): Quote decoded words diff -r 7cc86e0f08f6 -r a2c5c861962a lisp/gnus/gnus-art.el --- a/lisp/gnus/gnus-art.el Tue Feb 22 23:12:15 2005 +0000 +++ b/lisp/gnus/gnus-art.el Tue Feb 22 23:15:11 2005 +0000 @@ -6648,15 +6648,18 @@ (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 @@ (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