GNU bug report logs -
#44981
28.0.50; Restore nnimap-split-download-body?
Previous Next
Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Date: Tue, 1 Dec 2020 04:13:02 UTC
Severity: normal
Found in version 28.0.50
Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Thanks for cleaning this up, Eric. Could someone please look into the
following byte-compilation warning?
In spam-setup-widening:
gnus/spam.el:1234:11: Warning: ‘nnimap-split-download-body-default’ is an
obsolete variable (as of 28.1); use ‘nnimap-split-download-body’ instead.
I was thinking of the following change:
[spam.diff (text/x-diff, inline)]
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index 96a7da2313..8634fa680d 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -44,12 +44,9 @@
;;; for the definitions of group content classification and spam processors
(require 'gnus)
-(eval-when-compile (require 'hashcash))
-
-;; for nnimap-split-download-body-default
-(eval-when-compile (require 'nnimap))
-
-(eval-when-compile (require 'cl-lib))
+(eval-when-compile
+ (require 'cl-lib)
+ (require 'hashcash))
;; autoload query-dig
(autoload 'query-dig "dig")
@@ -1230,8 +1227,9 @@ spam-generic-score
;;; set up IMAP widening if it's necessary
(defun spam-setup-widening ()
+ (defvar nnimap-split-download-body)
(when (spam-widening-needed-p)
- (setq nnimap-split-download-body-default t)))
+ (setq nnimap-split-download-body t)))
(defun spam-widening-needed-p (&optional force-symbols)
(let (found)
[Message part 3 (text/plain, inline)]
But Ted explicitly changed spam-setup-widening in 2003 to use
nnimap-split-download-body-default instead of
nnimap-split-download-body, to avoid modifying a user option.
I don't know what spam-setup-widening is meant to do, and by extension I
don't know what TRT to do here is. Either way, loading nnimap in
eval-when-compile "for a variable" is definitely dubious. Ideas?
Thanks,
--
Basil
This bug report was last modified 4 years and 167 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.