(nnimap-request-accept-article): Remove \n's from
[gnus] / lisp / gnus-srvr.el
index f947e69..f1224c9 100644 (file)
@@ -1,5 +1,6 @@
 ;;; gnus-srvr.el --- virtual server support for Gnus
-;; Copyright (C) 1995-2000 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,11 +626,17 @@ The following commands are available:
       (setq groups (sort groups
                         (lambda (l1 l2)
                           (string< (car l1) (car l2)))))
-      (let ((buffer-read-only nil))
+      (let ((buffer-read-only nil) charset)
        (while groups
          (setq group (car groups))
-         (insert
-          (format "K%7d: %s\n" (cdr group) (car group)))
+         (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))
@@ -674,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)
@@ -717,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."