(gnus-group-completing-read): Remove all newlines from group names. They mess up...
[gnus] / lisp / gnus-group.el
index 7720c1c..667c4ba 100644 (file)
@@ -2189,11 +2189,13 @@ if it is not a list."
                                      require-match initial-input
                                      (or hist 'gnus-group-history)
                                      def))
-    (if (if (listp collection)
-           (member group (mapcar 'symbol-name collection))
-         (symbol-value (intern-soft group collection)))
-       group
-      (mm-encode-coding-string group (gnus-group-name-charset nil group)))))
+    (unless (if (listp collection)
+               (member group (mapcar 'symbol-name collection))
+             (symbol-value (intern-soft group collection)))
+      (setq group
+           (mm-encode-coding-string
+            group (gnus-group-name-charset nil group))))
+    (replace-regexp-in-string "\n" "" group)))
 
 ;;;###autoload
 (defun gnus-fetch-group (group &optional articles)