Synch with `t-gnus-6_14'.
[elisp/gnus.git-] / lisp / gnus-srvr.el
index ae85dac..f1224c9 100644 (file)
@@ -1,5 +1,6 @@
 ;;; gnus-srvr.el --- virtual server support for Gnus
-;; Copyright (C) 1995,96,97,98,99 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+;;        Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -625,17 +626,17 @@ The following commands are available:
       (setq groups (sort groups
                         (lambda (l1 l2)
                           (string< (car l1) (car l2)))))
-      (let ((buffer-read-only nil) 
-           (gnus-select-method nil) 
-           name)
+      (let ((buffer-read-only nil) charset)
        (while groups
-         (setq group (car groups)
-               name (format "%s" (car group)))
-         (insert (if (cadr (gnus-gethash 
-                            (gnus-group-prefixed-name name method)
-                            gnus-newsrc-hashtb))
-                     " " "K")
-                 (format "%7d: " (cdr group)) name "\n")
+         (setq group (car groups))
+         (setq charset (gnus-group-name-charset method group))
+         (gnus-add-text-properties
+          (point)
+          (prog1 (1+ (point))
+            (insert
+             (format "K%7d: %s\n" (cdr group)
+                     (gnus-group-name-decode (car group) charset))))
+          (list 'gnus-group (car group)))
          (setq groups (cdr groups))))
       (switch-to-buffer (current-buffer))
       (goto-char (point-min))
@@ -680,7 +681,7 @@ buffer.
     (if (or (not (gnus-get-info group))
            (gnus-ephemeral-group-p group))
        (unless (gnus-group-read-ephemeral-group
-                group gnus-browse-current-method nil
+                (gnus-group-real-name group) gnus-browse-current-method nil
                 (cons (current-buffer) 'browse))
          (error "Couldn't enter %s" group))
       (unless (gnus-group-read-group nil no-article group)
@@ -723,11 +724,12 @@ buffer.
 (defun gnus-browse-group-name ()
   (save-excursion
     (beginning-of-line)
-    (when (re-search-forward ": \\(.*\\)$" (gnus-point-at-eol) t)
-      (gnus-group-prefixed-name
-       ;; Remove text props.
-       (format "%s" (match-string 1))
-       gnus-browse-current-method))))
+    (let ((name (get-text-property (point) 'gnus-group)))
+      (when (re-search-forward ": \\(.*\\)$" (gnus-point-at-eol) t)
+       (gnus-group-prefixed-name
+        (or name
+            (match-string-no-properties 1))
+        gnus-browse-current-method)))))
 
 (defun gnus-browse-unsubscribe-group ()
   "Toggle subscription of the current group in the browse buffer."