From b7df893161350265e845a70d711a97a32536a221 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Fri, 22 Oct 2010 17:03:22 +0200 Subject: [PATCH] (gnus-group-completing-read): Remove all newlines from group names. They mess up the group buffer badly. --- lisp/ChangeLog | 3 +++ lisp/gnus-group.el | 12 +++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 020fbc69a..59d6ac9ba 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-10-22 Lars Magne Ingebrigtsen + * 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 diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 7720c1cc7..667c4bafc 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -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) -- 2.25.1