From 21a6dfc1648cf5ec3a773d7624806a24c9b358a4 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Tue, 8 Feb 2022 13:19:44 +0100 Subject: [PATCH 1/4] just use temp-buffer for `nnmail-article-buffer'. It is used in one and only place as a temporary buffer. --- lisp/gnus/nnmail.el | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index c71627f83a..af9c439280 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -571,9 +571,6 @@ nnmail-debug-splitting ;;; Internal variables. -(defvar nnmail-article-buffer " *nnmail incoming*" - "The buffer used for splitting incoming mails.") - (defvar nnmail-split-history nil "List of group/article elements that say where the previous split put messages.") @@ -1043,8 +1040,7 @@ nnmail-split-incoming (list (list group "")) nnmail-split-methods))) ;; Insert the incoming file. - (with-current-buffer (gnus-get-buffer-create nnmail-article-buffer) - (erase-buffer) + (with-temp-buffer (if (bufferp incoming) (insert-buffer-substring incoming) ;; The following coding system is set to @@ -1072,8 +1068,7 @@ nnmail-split-incoming (t (nnmail-process-unix-mail-format func artnum-func)))) (when exit-func - (funcall exit-func)) - (kill-buffer (current-buffer)))))) + (funcall exit-func)))))) (defun nnmail-article-group (func &optional trace junk-func) "Look at the headers and return an alist of groups that match. -- 2.35.1