diff options
author | Miles Bader <miles@gnu.org> | 2004-09-29 22:52:05 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2004-09-29 22:52:05 +0000 |
commit | 14e20e1309c68b214db1b6d3c369a2c2bdaeb4e2 (patch) | |
tree | cb714b6a21c14a5f8d70f95732dc46eab32e1f54 /lisp/gnus/gnus.el | |
parent | 30857a614a4dd26c6f20d45d51694dec60260ce8 (diff) | |
download | emacs-14e20e1309c68b214db1b6d3c369a2c2bdaeb4e2.tar.gz |
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-585
Merge from gnus--rel--5.10
Patches applied:
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-38
Update from CVS
Diffstat (limited to 'lisp/gnus/gnus.el')
-rw-r--r-- | lisp/gnus/gnus.el | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 28ef2c22a15..979ee2a7c24 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -3261,6 +3261,38 @@ that that variable is buffer-local to the summary buffers." (nth 1 method)))) method))) +(defsubst gnus-method-to-server (method) + (catch 'server-name + (setq method (or method gnus-select-method)) + + ;; Perhaps it is already in the cache. + (mapc (lambda (name-method) + (if (equal (cdr name-method) method) + (throw 'server-name (car name-method)))) + gnus-server-method-cache) + + (mapc + (lambda (server-alist) + (mapc (lambda (name-method) + (when (gnus-methods-equal-p (cdr name-method) method) + (unless (member name-method gnus-server-method-cache) + (push name-method gnus-server-method-cache)) + (throw 'server-name (car name-method)))) + server-alist)) + (let ((alists (list gnus-server-alist + gnus-predefined-server-alist))) + (if gnus-select-method + (push (list (cons "native" gnus-select-method)) alists)) + alists)) + + (let* ((name (if (member (cadr method) '(nil "")) + (format "%s" (car method)) + (format "%s:%s" (car method) (cadr method)))) + (name-method (cons name method))) + (unless (member name-method gnus-server-method-cache) + (push name-method gnus-server-method-cache)) + name))) + (defsubst gnus-server-to-method (server) "Map virtual server names to select methods." (or (and server (listp server) server) |