(gnus-group-completing-read): Remove all newlines from group names. They mess up...
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Fri, 22 Oct 2010 15:03:22 +0000 (17:03 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Fri, 22 Oct 2010 15:03:22 +0000 (17:03 +0200)
lisp/ChangeLog
lisp/gnus-group.el

index 020fbc6..59d6ac9 100644 (file)
@@ -1,5 +1,8 @@
 2010-10-22  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2010-10-22  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-group.el (gnus-group-completing-read): Remove all newlines from
+       group names.  They mess up the group buffer badly.
+
        * shr.el (shr-tag-img): Don't bug out on images that don't have a SRC.
 
        * gnus-group.el (gnus-group-mark-group): Use gnus-group-position-point
        * shr.el (shr-tag-img): Don't bug out on images that don't have a SRC.
 
        * gnus-group.el (gnus-group-mark-group): Use gnus-group-position-point
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))
                                      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)
 
 ;;;###autoload
 (defun gnus-fetch-group (group &optional articles)