]> git.eshelyaron.com Git - emacs.git/commit
Avoid modifying nnimap user option in spam.el
authorBasil L. Contovounesios <contovob@tcd.ie>
Sat, 5 Dec 2020 15:28:35 +0000 (15:28 +0000)
committerBasil L. Contovounesios <contovob@tcd.ie>
Sun, 6 Dec 2020 11:45:52 +0000 (11:45 +0000)
commite84a1ffde9047c1ca0acb9abcd6d31e3bfba457d
tree25d5b83111ce74d46e87875d3a3659488e47afe7
parent61497defb42e84a7ca32774a0ac16b30789f91d8
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.
lisp/gnus/nnimap.el
lisp/gnus/spam.el