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 | 6a7147dc42eeadec40b8ebd06a9378ce4fcb4bcb (patch) | |
tree | f7b6b86118bf51d526ffb07d2cb6ca38ba0bed03 /lisp/gnus | |
parent | 17392607b9aefe0c1beab017472db6baee1ffe7e (diff) | |
download | emacs-6a7147dc42eeadec40b8ebd06a9378ce4fcb4bcb.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')
-rw-r--r-- | lisp/gnus/ChangeLog | 4 | ||||
-rw-r--r-- | lisp/gnus/gnus.el | 32 |
2 files changed, 36 insertions, 0 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 3cdda661e86..6ac6d46e28f 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2004-09-29 Jesper Harder <harder@ifa.au.dk> + + * gnus.el (gnus-method-to-server): Oops, move it don't delete it. + 2004-09-28 Jesper Harder <harder@ifa.au.dk> * gnus-picon.el: Require cl. 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) |