summaryrefslogtreecommitdiff
path: root/lisp/gnus/nnimap.el
diff options
context:
space:
mode:
authorBasil L. Contovounesios <contovob@tcd.ie>2020-12-05 15:28:35 +0000
committerBasil L. Contovounesios <contovob@tcd.ie>2020-12-06 11:45:52 +0000
commite84a1ffde9047c1ca0acb9abcd6d31e3bfba457d (patch)
tree25d5b83111ce74d46e87875d3a3659488e47afe7 /lisp/gnus/nnimap.el
parent61497defb42e84a7ca32774a0ac16b30789f91d8 (diff)
downloademacs-e84a1ffde9047c1ca0acb9abcd6d31e3bfba457d.tar.gz
emacs-e84a1ffde9047c1ca0acb9abcd6d31e3bfba457d.tar.bz2
emacs-e84a1ffde9047c1ca0acb9abcd6d31e3bfba457d.zip
Avoid modifying nnimap user option in spam.el
* lisp/gnus/nnimap.el (nnimap--split-download-body): New variable. (nnimap-fetch-inbox): Use it in conjunction with nnimap-split-download-body. * lisp/gnus/spam.el: Don't load nnimap.el at compile time for a dynamic variable. (spam-setup-widening): Rather than unconditionally set user option nnimap-split-download-body, set nnimap--split-download-body to a unique non-nil value only if the variable was nil (bug#44981). (spam-teardown-widening): New function that undoes this if nnimap--split-download-body still holds the unique value. (spam-unload-hook): Call spam-teardown-widening to revert any change to the value of nnimap--split-download-body.
Diffstat (limited to 'lisp/gnus/nnimap.el')
-rw-r--r--lisp/gnus/nnimap.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index a8603330662..c8b700ebcc6 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -157,6 +157,9 @@ during splitting, which may be slow."
:version "28.1"
:type 'boolean)
+(defvar nnimap--split-download-body nil
+ "Like `nnimap-split-download-body', but for internal use.")
+
(defvar nnimap-process nil)
(defvar nnimap-status-string "")
@@ -2108,7 +2111,8 @@ Return the server's response to the SELECT or EXAMINE command."
"BODY.PEEK"
"RFC822.PEEK"))
(cond
- (nnimap-split-download-body
+ ((or nnimap-split-download-body
+ nnimap--split-download-body)
"[]")
((nnimap-ver4-p)
"[HEADER]")