1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-05 11:45:45 +00:00

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.
This commit is contained in:
Miles Bader 2005-02-22 23:15:11 +00:00
parent 62bf2fd1a5
commit 82a8ad04d2
2 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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