;;; gnus-srvr.el --- virtual server support for Gnus
-;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
The following specs are understood:
-%h backend
+%h back end
%n name
%w address
%s status
(defcustom gnus-server-browse-in-group-buffer nil
"Whether server browsing should take place in the group buffer.
If nil, a faster, but more primitive, buffer is used instead."
+ :version "21.4"
:group 'gnus-server-visual
:type 'boolean)
(defcustom gnus-server-offline-face 'gnus-server-offline-face
"Face name to use on OFFLINE servers."
+ :version "21.4"
:group 'gnus-server-visual
:type 'face)
(and server (symbol-name server))))
(defun gnus-server-named-server ()
- "Returns a server name that matches one of the names returned by
-gnus-method-to-server."
+ "Return a server name that matches one of the names returned by
+`gnus-method-to-server'."
(let ((server (get-text-property (point-at-bol) 'gnus-named-server)))
(and server (symbol-name server))))
(if cached
(setq gnus-server-method-cache
(delq cached gnus-server-method-cache)))
- (if entry (setcdr entry info)
+ (if entry
+ (progn
+ ;; Remove the server from `gnus-opened-servers' since
+ ;; it has never been opened with the new `info' yet.
+ (gnus-opened-servers-remove (cdr entry))
+ ;; Don't make a new Lisp object.
+ (setcar (cdr entry) (car info))
+ (setcdr (cdr entry) (cdr info)))
(setq gnus-server-alist
(nconc gnus-server-alist (list (cons server info))))))))
(if (eq (car method) 'nntp)
(while (not (eobp))
(ignore-errors
- (push (cons
- (buffer-substring
+ (push (cons
+ (buffer-substring
(point)
- (progn
+ (progn
(skip-chars-forward "^ \t")
(point)))
(let ((last (read cur)))
(prog1 (1+ (point))
(insert
(format "%c%7d: %s\n"
- (let ((level (gnus-group-level
- (concat prefix (setq name (car group))))))
+ (let ((level
+ (if (string= prefix "")
+ (gnus-group-level (setq name (car group)))
+ (gnus-group-level
+ (concat prefix (setq name (car group)))))))
(cond
((<= level gnus-level-subscribed) ? )
((<= level gnus-level-unsubscribed) ?U)
((= level gnus-level-zombie) ?Z)
(t ?K)))
(max 0 (- (1+ (cddr group)) (cadr group)))
- (decode-coding-string
- name
- (inline (gnus-group-name-charset method name))))))
- (list 'gnus-group name))))
+ ;; Don't decode if name is ASCII
+ (if (and (fboundp 'detect-coding-string)
+ (eq (detect-coding-string name t) 'undecided))
+ name
+ (decode-coding-string
+ name
+ (inline (gnus-group-name-charset method name)))))))
+ (list 'gnus-group name)
+ )))
(switch-to-buffer (current-buffer)))
(goto-char (point-min))
(gnus-group-position-point)
(beginning-of-line)
(let ((name (get-text-property (point) 'gnus-group)))
(when (re-search-forward ": \\(.*\\)$" (point-at-eol) t)
- (concat (gnus-method-to-server-name gnus-browse-current-method) ":"
+ (concat (gnus-method-to-server-name gnus-browse-current-method) ":"
(or name
(match-string-no-properties 1)))))))
(gnus-get-function (gnus-server-to-method server)
'request-regenerate)
(error
- (error "This backend doesn't support regeneration")))
+ (error "This back end doesn't support regeneration")))
(gnus-message 5 "Requesting regeneration of %s..." server)
(unless (gnus-open-server server)
(error "Couldn't open server"))