summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog166
-rw-r--r--lisp/gnus/ecomplete.el2
-rw-r--r--lisp/gnus/gnus-art.el136
-rw-r--r--lisp/gnus/gnus-cache.el11
-rw-r--r--lisp/gnus/gnus-ems.el2
-rw-r--r--lisp/gnus/gnus-fun.el12
-rw-r--r--lisp/gnus/gnus-group.el6
-rw-r--r--lisp/gnus/gnus-int.el41
-rw-r--r--lisp/gnus/gnus-spec.el6
-rw-r--r--lisp/gnus/gnus-start.el8
-rw-r--r--lisp/gnus/gnus-sum.el25
-rw-r--r--lisp/gnus/gnus-util.el58
-rw-r--r--lisp/gnus/gnus-uu.el2
-rw-r--r--lisp/gnus/gnus.el6
-rw-r--r--lisp/gnus/mail-source.el9
-rw-r--r--lisp/gnus/message.el10
-rw-r--r--lisp/gnus/mm-bodies.el7
-rw-r--r--lisp/gnus/mm-decode.el43
-rw-r--r--lisp/gnus/mm-extern.el6
-rw-r--r--lisp/gnus/mm-util.el10
-rw-r--r--lisp/gnus/mm-uu.el2
-rw-r--r--lisp/gnus/mm-view.el12
-rw-r--r--lisp/gnus/mml-smime.el16
-rw-r--r--lisp/gnus/mml.el10
-rw-r--r--lisp/gnus/mml1991.el19
-rw-r--r--lisp/gnus/mml2015.el15
-rw-r--r--lisp/gnus/nndb.el11
-rw-r--r--lisp/gnus/nnfolder.el8
-rw-r--r--lisp/gnus/nnheader.el2
-rw-r--r--lisp/gnus/nnmail.el10
-rw-r--r--lisp/gnus/nnmaildir.el28
-rw-r--r--lisp/gnus/nnrss.el8
-rw-r--r--lisp/gnus/pop3.el2
-rw-r--r--lisp/gnus/rfc1843.el8
-rw-r--r--lisp/gnus/sieve-manage.el7
-rw-r--r--lisp/gnus/smime.el6
-rw-r--r--lisp/gnus/spam-stat.el2
-rw-r--r--lisp/gnus/spam.el15
38 files changed, 629 insertions, 118 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index bb92d478277..d8bb4876269 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,169 @@
+2007-12-15 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-art.el (article-verify-x-pgp-sig): Add reference to X-PGP-Sig
+ format document.
+ (gnus-mime-delete-part): Don't write description line if empty.
+ (gnus-article-encrypt-body): Add confirmation for gnus-novice-user.
+
+2007-12-14 Johan Bockg,Ae(Brd <bojohan@gnu.org>
+
+ * gnus-sum.el (gnus-summary-mark-unread-as-read)
+ (gnus-summary-mark-read-and-unread-as-read)
+ (gnus-summary-mark-current-read-and-unread-as-read)
+ (gnus-summary-mark-unread-as-ticked): Doc fix.
+ `gnus-mark-article-hook', not `gnus-summary-mark-article-hook'.
+
+2007-12-14 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-sum.el (gnus-summary-prev-article): Fix doc string. Reported by
+ Christoph Conrad <christoph.conrad@gmx.de>.
+
+2007-12-14 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-util.el (gnus-y-or-n-p, gnus-yes-or-no-p): Alias to y-or-n-p and
+ yes-or-no-p.
+
+2007-12-11 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * mm-decode.el (mm-add-meta-html-tag): New function.
+ (mm-save-part-to-file, mm-pipe-part): Use it
+
+ * gnus-art.el (gnus-article-browse-delete-temp-files): Use
+ gnus-y-or-n-p instead of y-or-n-p.
+ (gnus-article-browse-html-parts): Work with message/external-body; use
+ mm-add-meta-html-tag.
+
+2007-12-11 Glenn Morris <rgm@gnu.org>
+
+ * gnus-cache.el: Require gnus-sum not just when compiling.
+
+ * gnus-fun.el (gnus-display-x-face-in-from): Require gnus-art.
+
+ * gnus-int.el (gnus-server-opened, gnus-status-message): Move
+ definitions before use.
+
+ * mm-decode.el: Require gnus-util.
+ (mm-remove-part): Only call delete-annotation on XEmacs.
+
+ * mm-uu.el (gnus-original-article-buffer): Define for compiler.
+
+ * nnmail.el: Require gnus-int.
+
+ * spam.el: Move `require's before `eval-when-compile's.
+
+ * gnus-ems.el (gnus-alive-p):
+ * gnus-fun.el (message-goto-eoh):
+ * gnus-util.el (gnus-group-name-decode):
+ * mail-source.el (gnus-compress-sequence):
+ * message.el (Info-goto-node, format-spec):
+ * mm-bodies.el (message-options-get):
+ * mm-decode.el (mm-view-pkcs7):
+ * mm-util.el (gmm-write-region):
+ * mml-smime.el (mml-compute-boundary)
+ (gnus-completing-read-with-default):
+ * mml.el (widget-button-press, gnus-make-hashtable):
+ * mml1991.el (mm-decode-content-transfer-encoding)
+ (mm-encode-content-transfer-encoding)
+ (message-options-get, message-options-set):
+ * mml2015.el (gnus-buffer-live-p, gnus-get-buffer-create):
+ * nnfolder.el (gnus-request-group):
+ * nnheader.el (ietf-drums-unfold-fws):
+ * rfc1843.el (mail-header-parse-content-type, message-narrow-to-head):
+ * smime.el (gnus-run-mode-hooks):
+ * spam-stat.el (gnus-message): Autoload.
+
+ * gnus-cache.el, gnus-fun.el, gnus-group.el, gnus.el, mail-source.el:
+ * mm-bodies.el, mm-decode.el, mm-extern.el, mm-util.el:
+ * mml-smime.el, mml.el, mml1991.el, mml2015.el, nndb.el, nnfolder.el:
+ * nnmail.el, nnmaildir.el, nnrss.el, rfc1843.el, spam.el:
+ Add declare-function compatibility definition.
+
+ * gnus-cache.el (nnvirtual-find-group-art):
+ * gnus-fun.el (article-narrow-to-head, gnus-article-goto-header)
+ (gnus-add-image, gnus-add-wash-type):
+ * gnus-group.el (nnkiboze-score-file):
+ * gnus-sum.el (turn-on-gnus-mailing-list-mode)
+ (gnus-cache-write-active, mm-uu-dissect, idna-to-unicode):
+ * gnus-util.el (gnus-find-method-for-group, gnus-group-name-charset)
+ (message-tokenize-header, gnus-get-buffer-create)
+ (mm-enable-multibyte, gnus-put-text-property, gnus-overlay-put)
+ (gnus-make-overlay, mm-disable-multibyte, gnus-add-text-properties):
+ * gnus.el (gnus-group-decoded-name):
+ * mail-source.el (imap-capability):
+ * mm-bodies.el (message-options-set):
+ * mm-decode.el (gnus-configure-windows):
+ * mm-extern.el (message-goto-body):
+ * mm-util.el (mm-delete-duplicates, mm-detect-coding-region):
+ * mml-smime.el (epg-key-sub-key-list, epg-sub-key-capability)
+ (epg-sub-key-validity, message-options-set):
+ * mml.el (widget-event-point, gnus-configure-windows):
+ * mml1991.el (mc-encrypt-generic, gpg-sign-encrypt, gpg-encrypt):
+ * mml2015.el (epg-check-configuration, epg-configuration)
+ (message-options-set):
+ * nndb.el (nndb-request-article):
+ * nnfolder.el (gnus-request-create-group):
+ * nnmail.el (gnus-activate-group, gnus-group-mark-article-read):
+ * nnmaildir.el (gnus-group-mark-article-read):
+ * nnrss.el (w3-parse-buffer, gnus-group-make-rss-group):
+ * rfc1843.el (message-fetch-field):
+ * spam.el (gnus-extract-address-components):
+ Declare as functions.
+
+2007-12-10 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-art.el (gnus-article-browse-html-parts): Decode CTE.
+
+2007-12-09 Glenn Morris <rgm@gnu.org>
+
+ * gnus-uu.el (gnus-uu-yenc-article): Use insert-buffer-substring.
+
+ * gnus-art.el, gnus-spec.el, gnus-sum.el, gnus-util.el:
+ * message.el, mm-view.el, sieve-manage, smime.el:
+ Add declare-function compatibility definition.
+
+ * gnus-art.el (w3-region, w3m-region, Info-menu):
+ * gnus-spec.el (gnus-summary-from-or-to-or-newsgroups):
+ * gnus-sum.el (gnus-get-predicate):
+ * gnus-util.el (mm-append-to-file, w32-focus-frame):
+ * message.el (mail-abbrev-in-expansion-header-p):
+ * mm-view.el (w3-do-setup, w3-region, w3-prepare-buffer)
+ (w3m-detect-meta-charset, w3m-region):
+ * sieve-manage.el (password-read, password-cache-add)
+ (password-cache-remove):
+ * smime.el (password-read-and-add): Declare as functions.
+
+2007-12-08 David Kastrup <dak@gnu.org>
+
+ * gnus-sum.el (gnus-summary-simplify-subject-query):
+ * ecomplete.el (ecomplete-display-matches): Fix buggy call to
+ `message'.
+
+2007-12-07 Glenn Morris <rgm@gnu.org>
+
+ * gnus-art.el (article-make-date-line): Revert previous change.
+
+2007-12-06 Reiner Steib <Reiner.Steib@gmx.de>
+
+ * gnus-start.el (gnus-load): Rename local variable to avoid confusion.
+
+2007-12-06 Christian Plate <cplate@web.de> (tiny change)
+
+ * nnmaildir.el (nnmaildir-request-update-info): Improved performance.
+ Call gnus-add-to-range ranges only once with a prepared article-list.
+
+2007-12-06 Paul Jarc <prj@po.cwru.edu>
+
+ * nnmaildir.el (nnmaildir-request-list, nnmaildir-retrieve-groups,
+ nnmaildir-request-group, nnmaildir-retrieve-headers): Escape spaces in
+ group names with backslashes. Reported by Tassilo Horn
+ <tassilo@member.fsf.org>.
+
+2007-12-06 D. Goel <deego3@gmail.com>
+
+ * gnus-art.el (article-make-date-line):
+ * gnus-start.el (gnus-load):
+ * pop3.el (pop3-read-response): Fix buggy call to `error'.
+
2007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-use-idna)
diff --git a/lisp/gnus/ecomplete.el b/lisp/gnus/ecomplete.el
index 42a75916277..285aca4270a 100644
--- a/lisp/gnus/ecomplete.el
+++ b/lisp/gnus/ecomplete.el
@@ -119,7 +119,7 @@
nil)
(if (not choose)
(progn
- (message matches)
+ (message "%s" matches)
nil)
(setq highlight (ecomplete-highlight-match-line matches line))
(while (not (memq (setq command (read-event highlight)) '(? return)))
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 4bb9ceb97ba..e984372543d 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -27,6 +27,9 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile
(require 'cl))
(defvar tool-bar-map)
@@ -2705,6 +2708,9 @@ charset defined in `gnus-summary-show-article-charset-alist' is used."
(t
(apply (car func) (cdr func))))))))))
+;; External.
+(declare-function w3-region "ext:w3-display" (st nd))
+
(defun gnus-article-wash-html-with-w3 ()
"Wash the current buffer with w3."
(mm-setup-w3)
@@ -2716,6 +2722,9 @@ charset defined in `gnus-summary-show-article-charset-alist' is used."
(w3-region (point-min) (point-max))
(error))))
+;; External.
+(declare-function w3m-region "ext:w3m" (start end &optional url charset))
+
(defun gnus-article-wash-html-with-w3m ()
"Wash the current buffer with emacs-w3m."
(mm-setup-w3m)
@@ -2773,9 +2782,9 @@ summary buffer."
(or how
(setq how gnus-article-browse-delete-temp)))
(when (and (eq how 'ask)
- (y-or-n-p (format
- "Delete all %s temporary HTML file(s)? "
- (length gnus-article-browse-html-temp-list)))
+ (gnus-y-or-n-p (format
+ "Delete all %s temporary HTML file(s)? "
+ (length gnus-article-browse-html-temp-list)))
(setq how t)))
(dolist (file gnus-article-browse-html-temp-list)
(when (and (file-exists-p file)
@@ -2793,61 +2802,63 @@ summary buffer."
"View all \"text/html\" parts from LIST.
Recurse into multiparts."
;; Internal function used by `gnus-article-browse-html-article'.
- (let ((showed))
+ (let (type file charset tmp-file showed)
;; Find and show the html-parts.
(dolist (handle list)
;; If HTML, show it:
- (when (listp handle)
- (cond ((and (bufferp (car handle))
- (string-match "text/html" (car (mm-handle-type handle))))
- (let ((tmp-file (mm-make-temp-file
- ;; Do we need to care for 8.3 filenames?
- "mm-" nil ".html"))
- (charset (mail-content-type-get (mm-handle-type handle)
- 'charset)))
- (if charset
- ;; Add a meta html tag to specify charset.
- (mm-with-unibyte-buffer
- (insert (with-current-buffer (mm-handle-buffer handle)
- (if (eq charset 'gnus-decoded)
- (mm-encode-coding-string
- (buffer-string)
- (setq charset 'utf-8))
- (buffer-string))))
- (setq charset (format "\
-<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">"
- charset))
- (goto-char (point-min))
- (let ((case-fold-search t))
- (cond (;; Don't modify existing meta tag.
- (re-search-forward "\
-<meta[\t\n\r ]+http-equiv=\"content-type\"[^>]+>"
- nil t))
- ((re-search-forward "<head>[\t\n\r ]*" nil t)
- (insert charset "\n"))
- (t
- (re-search-forward "\
-<html\\(?:[\t\n\r ]+[^>]+\\|[\t\n\r ]*\\)>[\t\n\r ]*"
- nil t)
- (insert "<head>\n" charset "\n</head>\n"))))
+ (cond ((not (listp handle)))
+ ((or (equal (car (setq type (mm-handle-type handle))) "text/html")
+ (and (equal (car type) "message/external-body")
+ (setq file (or (mail-content-type-get type 'name)
+ (mail-content-type-get
+ (mm-handle-disposition handle)
+ 'filename)))
+ (or (mm-handle-cache handle)
+ (condition-case code
+ (progn (mm-extern-cache-contents handle) t)
+ (error
+ (gnus-message 3 "%s" (error-message-string code))
+ (when (>= gnus-verbose 3) (sit-for 2))
+ nil)))
+ (progn
+ (setq handle (mm-handle-cache handle)
+ type (mm-handle-type handle))
+ (equal (car type) "text/html"))))
+ (when (or (setq charset (mail-content-type-get type 'charset))
+ (not file))
+ (setq tmp-file (mm-make-temp-file
+ ;; Do we need to care for 8.3 filenames?
+ "mm-" nil ".html")))
+ (if charset
+ ;; Add a meta html tag to specify charset.
+ (mm-with-unibyte-buffer
+ (insert (if (eq charset 'gnus-decoded)
+ (mm-encode-coding-string (mm-get-part handle)
+ (setq charset 'utf-8))
+ (mm-get-part handle)))
+ (if (or (mm-add-meta-html-tag handle charset)
+ (not file))
(mm-write-region (point-min) (point-max)
- tmp-file nil nil nil 'binary t))
- (mm-save-part-to-file handle tmp-file))
- (add-to-list 'gnus-article-browse-html-temp-list tmp-file)
- (add-hook 'gnus-summary-prepare-exit-hook
- 'gnus-article-browse-delete-temp-files)
- (add-hook 'gnus-exit-gnus-hook
- (lambda ()
- (gnus-article-browse-delete-temp-files t)))
- ;; FIXME: Warn if there's an <img> tag?
- (browse-url-of-file tmp-file)
- (setq showed t)))
- ;; If multipart, recurse
- ((and (stringp (car handle))
- (string-match "^multipart/" (car handle))
- (setq showed
- (or showed
- (gnus-article-browse-html-parts handle))))))))
+ tmp-file nil nil nil 'binary t)
+ (setq tmp-file nil)))
+ (when tmp-file
+ (mm-save-part-to-file handle tmp-file)))
+ (when tmp-file
+ (add-to-list 'gnus-article-browse-html-temp-list tmp-file))
+ (add-hook 'gnus-summary-prepare-exit-hook
+ 'gnus-article-browse-delete-temp-files)
+ (add-hook 'gnus-exit-gnus-hook
+ (lambda ()
+ (gnus-article-browse-delete-temp-files t)))
+ ;; FIXME: Warn if there's an <img> tag?
+ (browse-url-of-file (or tmp-file (expand-file-name file)))
+ (setq showed t))
+ ;; If multipart, recurse
+ ((and (stringp (car handle))
+ (string-match "^multipart/" (car handle))
+ (setq showed
+ (or showed
+ (gnus-article-browse-html-parts handle)))))))
showed))
;; FIXME: Documentation in texi/gnus.texi missing.
@@ -3907,6 +3918,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
(defun article-verify-x-pgp-sig ()
"Verify X-PGP-Sig."
+ ;; <ftp://ftp.isc.org/pub/pgpcontrol/FORMAT>
(interactive)
(if (gnus-buffer-live-p gnus-original-article-buffer)
(let ((sig (with-current-buffer gnus-original-article-buffer
@@ -4715,8 +4727,9 @@ Deleting parts may malfunction or destroy the article; continue? "))
(handles gnus-article-mime-handles)
(none "(none)")
(description
- (mail-decode-encoded-word-string (or (mm-handle-description data)
- none)))
+ (let ((desc (mm-handle-description data)))
+ (when desc
+ (mail-decode-encoded-word-string desc))))
(filename
(or (mail-content-type-get (mm-handle-disposition data) 'filename)
none))
@@ -4734,7 +4747,8 @@ Deleting parts may malfunction or destroy the article; continue? "))
"| Type: " type "\n"
"| Filename: " filename "\n"
"| Size (encoded): " bsize " Byte\n"
- "| Description: " description "\n"
+ (when description
+ (concat "| Description: " description "\n"))
"`----\n"))
(setcdr data
(cdr (mm-make-handle
@@ -7682,6 +7696,9 @@ url is put as the `gnus-button-url' overlay property on the button."
"Fetch KDE style info URL."
(gnus-info-find-node (gnus-url-unhex-string url)))
+;; (info) will autoload info.el
+(declare-function Info-menu "info" (menu-item &optional fork))
+
(defun gnus-button-handle-info-keystrokes (url)
"Call `info' when pushing the corresponding URL button."
;; For links like `C-h i d m gnus RET', `C-h i d m CC Mode RET'.
@@ -7991,6 +8008,11 @@ For example:
gnus-article-encrypt-protocol-alist
nil t))
current-prefix-arg))
+ ;; User might hit `K E' instead of `K e', so prompt once.
+ (when (and gnus-article-encrypt-protocol
+ gnus-novice-user)
+ (unless (gnus-y-or-n-p "Really encrypt article(s)? ")
+ (error "Encrypt aborted.")))
(let ((func (cdr (assoc protocol gnus-article-encrypt-protocol-alist))))
(unless func
(error "Can't find the encrypt protocol %s" protocol))
diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el
index 4f61a0f2759..72c88600a5e 100644
--- a/lisp/gnus/gnus-cache.el
+++ b/lisp/gnus/gnus-cache.el
@@ -27,13 +27,18 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(require 'gnus)
+(require 'gnus-sum)
+
(eval-when-compile
(unless (fboundp 'gnus-agent-load-alist)
- (defun gnus-agent-load-alist (group)))
- (require 'gnus-sum))
+ (defun gnus-agent-load-alist (group))))
(defcustom gnus-cache-active-file
(expand-file-name "active" gnus-cache-directory)
@@ -91,6 +96,8 @@ it's not cached."
(defvar gnus-cache-active-altered nil)
(defvar gnus-cache-total-fetched-hashtb nil)
+(declare-function nnvirtual-find-group-art "nnvirtual" (group article))
+
(eval-and-compile
(autoload 'nnml-generate-nov-databases-directory "nnml")
(autoload 'nnvirtual-find-group-art "nnvirtual"))
diff --git a/lisp/gnus/gnus-ems.el b/lisp/gnus/gnus-ems.el
index 79e513b5f05..a49d46a94d6 100644
--- a/lisp/gnus/gnus-ems.el
+++ b/lisp/gnus/gnus-ems.el
@@ -161,6 +161,8 @@
"Non-nil means the mark and region are currently active in this buffer."
mark-active) ; aliased to region-exists-p in XEmacs.
+(autoload 'gnus-alive-p "gnus-util")
+
(defun gnus-x-splash ()
"Show a splash screen using a pixmap in the current buffer."
(interactive)
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index 05454960e38..e9c6d9fd816 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -26,6 +26,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile
(require 'cl))
@@ -105,6 +109,8 @@ Output to the current buffer, replace text, and don't mingle error."
(format gnus-convert-pbm-to-x-face-command
(shell-quote-argument file)))))))
+(autoload 'message-goto-eoh "message" nil t)
+
;;;###autoload
(defun gnus-insert-random-x-face-header ()
"Insert a random X-Face header from `gnus-x-face-directory'."
@@ -203,8 +209,14 @@ The colors from this face are used as the foreground and background
colors of the displayed X-Faces."
:group 'gnus-article-headers)
+(declare-function article-narrow-to-head "gnus-art" ())
+(declare-function gnus-article-goto-header "gnus-art" (header))
+(declare-function gnus-add-image "gnus-art" (category image))
+(declare-function gnus-add-wash-type "gnus-art" (type))
+
(defun gnus-display-x-face-in-from (data)
"Display the X-Face DATA in the From header."
+ (require 'gnus-art)
(let ((default-enable-multibyte-characters nil)
pbm)
(when (or (gnus-image-type-available-p 'xface)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 5843214e48a..73d632591b5 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -27,6 +27,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile
(require 'cl))
(defvar tool-bar-mode)
@@ -3004,6 +3008,8 @@ mail messages or news articles in files that have numeric names."
(list 'nndir (gnus-group-real-name group) (list 'nndir-directory dir)))))
(defvar nnkiboze-score-file)
+(declare-function nnkiboze-score-file "nnkiboze" (group))
+
(defun gnus-group-make-kiboze-group (group address scores)
"Create an nnkiboze group.
The user will be prompted for a name, a regexp to match groups, and
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index ac2b7237866..5c48f70a6ad 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -58,6 +58,27 @@ server denied."
(defvar gnus-internal-registry-spool-current-method nil
"The current method, for the registry.")
+
+(defun gnus-server-opened (gnus-command-method)
+ "Check whether a connection to GNUS-COMMAND-METHOD has been opened."
+ (unless (eq (gnus-server-status gnus-command-method)
+ 'denied)
+ (when (stringp gnus-command-method)
+ (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
+ (funcall (inline (gnus-get-function gnus-command-method 'server-opened))
+ (nth 1 gnus-command-method))))
+
+(defun gnus-status-message (gnus-command-method)
+ "Return the status message from GNUS-COMMAND-METHOD.
+If GNUS-COMMAND-METHOD is a string, it is interpreted as a group
+name. The method this group uses will be queried."
+ (let ((gnus-command-method
+ (if (stringp gnus-command-method)
+ (gnus-find-method-for-group gnus-command-method)
+ gnus-command-method)))
+ (funcall (gnus-get-function gnus-command-method 'status-message)
+ (nth 1 gnus-command-method))))
+
;;;
;;; Server Communication
;;;
@@ -315,26 +336,6 @@ If it is down, start it up (again)."
(when func
(funcall func date (nth 1 gnus-command-method)))))
-(defun gnus-server-opened (gnus-command-method)
- "Check whether a connection to GNUS-COMMAND-METHOD has been opened."
- (unless (eq (gnus-server-status gnus-command-method)
- 'denied)
- (when (stringp gnus-command-method)
- (setq gnus-command-method (gnus-server-to-method gnus-command-method)))
- (funcall (inline (gnus-get-function gnus-command-method 'server-opened))
- (nth 1 gnus-command-method))))
-
-(defun gnus-status-message (gnus-command-method)
- "Return the status message from GNUS-COMMAND-METHOD.
-If GNUS-COMMAND-METHOD is a string, it is interpreted as a group
-name. The method this group uses will be queried."
- (let ((gnus-command-method
- (if (stringp gnus-command-method)
- (gnus-find-method-for-group gnus-command-method)
- gnus-command-method)))
- (funcall (gnus-get-function gnus-command-method 'status-message)
- (nth 1 gnus-command-method))))
-
(defun gnus-request-regenerate (gnus-command-method)
"Request a data generation from GNUS-COMMAND-METHOD."
(when (stringp gnus-command-method)
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index f87377cb1ed..5b8bf92ffdb 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -27,6 +27,9 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile (require 'cl))
(defvar gnus-newsrc-file-version)
@@ -87,6 +90,9 @@ text properties. This is only needed on XEmacs, as FSF Emacs does this anyway."
(defvar gnus-tmp-header)
(defvar gnus-tmp-from)
+(declare-function gnus-summary-from-or-to-or-newsgroups "gnus-sum"
+ (header gnus-tmp-from))
+
(defun gnus-summary-line-format-spec ()
(insert gnus-tmp-unread gnus-tmp-replied
gnus-tmp-score-char gnus-tmp-indentation)
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el
index 2c1b6677949..bd0e4efafad 100644
--- a/lisp/gnus/gnus-start.el
+++ b/lisp/gnus/gnus-start.el
@@ -2394,11 +2394,11 @@ If FORCE is non-nil, the .newsrc file is read."
(eval form))
(error
(unless (eq (car type) 'end-of-file)
- (let ((error (format "Error in %s line %d" file
- (count-lines (point-min) (point)))))
+ (let ((errmsg (format "Error in %s line %d" file
+ (count-lines (point-min) (point)))))
(ding)
- (unless (gnus-yes-or-no-p (concat error "; continue? "))
- (error "%s" error)))))))))
+ (unless (gnus-yes-or-no-p (concat errmsg "; continue? "))
+ (error "%s" errmsg)))))))))
(defun gnus-read-newsrc-el-file (file)
(let ((ding-file (concat file "d")))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index b082a8b152e..62068d85a80 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -27,6 +27,9 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile
(require 'cl))
@@ -2959,6 +2962,9 @@ When FORCE, rebuild the tool bar."
(setq headers (cdr headers)))
(list (nreverse outh))))))))
+
+(declare-function turn-on-gnus-mailing-list-mode "gnus-ml" ())
+
(defun gnus-summary-mode (&optional group)
@@ -4028,7 +4034,7 @@ If NO-DISPLAY, don't generate a summary buffer."
"Query where the respool algorithm would put this article."
(interactive)
(gnus-summary-select-article)
- (message (gnus-general-simplify-subject (gnus-summary-article-subject))))
+ (message "%s" (gnus-general-simplify-subject (gnus-summary-article-subject))))
(defun gnus-gather-threads-by-subject (threads)
"Gather threads by looking at Subject headers."
@@ -5576,6 +5582,8 @@ If SELECT-ARTICLES, only select those articles from GROUP."
(gnus-inverse-list-range-intersection
gnus-newsgroup-articles gnus-newsgroup-seen))))
+(declare-function gnus-get-predicate "gnus-agent" (predicate))
+
(defun gnus-summary-display-make-predicate (display)
(require 'gnus-agent)
(when (= (length display) 1)
@@ -6946,6 +6954,8 @@ If FORCE (the prefix), also save the .newsrc file(s)."
(gnus-save-newsrc-file)
(gnus-dribble-save)))
+(declare-function gnus-cache-write-active "gnus-cache" (&optional force))
+
(defun gnus-summary-exit (&optional temporary leave-hidden)
"Exit reading current newsgroup, and then return to group selection mode.
`gnus-exit-group-hook' is called with no arguments if that value is non-nil."
@@ -7648,7 +7658,7 @@ If BACKWARD, the previous article is selected instead of the next."
(gnus-summary-article-subject))))
(defun gnus-summary-prev-article (&optional unread subject)
- "Select the article after the current one.
+ "Select the article before the current one.
If UNREAD is non-nil, only unread articles are selected."
(interactive "P")
(gnus-summary-next-article unread subject t))
@@ -9437,6 +9447,8 @@ prefix specifies how many places to rotate each letter forward."
;; Create buttons and stuff...
(gnus-treat-article nil))
+(declare-function idna-to-unicode "ext:idna" (str))
+
(defun gnus-summary-idna-message (&optional arg)
"Decode IDNA encoded domain names in the current articles.
IDNA encoded domain names looks like `xn--bar'. If a string
@@ -10818,12 +10830,12 @@ The difference between N and the number of marks cleared is returned."
(gnus-summary-mark-forward (- n) gnus-unread-mark))
(defun gnus-summary-mark-unread-as-read ()
- "Intended to be used by `gnus-summary-mark-article-hook'."
+ "Intended to be used by `gnus-mark-article-hook'."
(when (memq gnus-current-article gnus-newsgroup-unreads)
(gnus-summary-mark-article gnus-current-article gnus-read-mark)))
(defun gnus-summary-mark-read-and-unread-as-read (&optional new-mark)
- "Intended to be used by `gnus-summary-mark-article-hook'."
+ "Intended to be used by `gnus-mark-article-hook'."
(let ((mark (gnus-summary-article-mark)))
(when (or (gnus-unread-mark-p mark)
(gnus-read-mark-p mark))
@@ -10831,7 +10843,7 @@ The difference between N and the number of marks cleared is returned."
(or new-mark gnus-read-mark)))))
(defun gnus-summary-mark-current-read-and-unread-as-read (&optional new-mark)
- "Intended to be used by `gnus-summary-mark-article-hook'."
+ "Intended to be used by `gnus-mark-article-hook'."
(let ((mark (gnus-summary-article-mark)))
(when (or (gnus-unread-mark-p mark)
(gnus-read-mark-p mark))
@@ -10839,7 +10851,7 @@ The difference between N and the number of marks cleared is returned."
(or new-mark gnus-read-mark)))))
(defun gnus-summary-mark-unread-as-ticked ()
- "Intended to be used by `gnus-summary-mark-article-hook'."
+ "Intended to be used by `gnus-mark-article-hook'."
(when (memq gnus-current-article gnus-newsgroup-unreads)
(gnus-summary-mark-article gnus-current-article gnus-ticked-mark)))
@@ -11792,6 +11804,7 @@ save those articles instead."
encoded)))
(defvar gnus-summary-save-parts-counter)
+(declare-function mm-uu-dissect "mm-uu" (&optional noheader mime-type))
(defun gnus-summary-save-parts (type dir n &optional reverse)
"Save parts matching TYPE to DIR.
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index de01fb2db11..56aacf0d5a6 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -35,6 +35,9 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile
(require 'cl))
;; Fixme: this should be a gnus variable, not nnmail-.
@@ -214,6 +217,13 @@ is slower."
(search-forward ":" eol t)
(point)))))
+(declare-function gnus-find-method-for-group "gnus" (group &optional info))
+(autoload 'gnus-group-name-decode "gnus-group")
+(declare-function gnus-group-name-charset "gnus-group" (method group))
+;; gnus-group requires gnus-int which requires message.
+(declare-function message-tokenize-header "message"
+ (header &optional separator))
+
(defun gnus-decode-newsgroups (newsgroups group &optional method)
(let ((method (or method (gnus-find-method-for-group group))))
(mapconcat (lambda (group)
@@ -327,15 +337,23 @@ Symbols are also allowed; their print names are used instead."
;; Two silly functions to ensure that all `y-or-n-p' questions clear
;; the echo area.
-(defun gnus-y-or-n-p (prompt)
- (prog1
- (y-or-n-p prompt)
- (message "")))
-
-(defun gnus-yes-or-no-p (prompt)
- (prog1
- (yes-or-no-p prompt)
- (message "")))
+;;
+;; Do we really need these aliases? Workarounds for bugs in the corresponding
+;; Emacs functions? Maybe these bug are no longer present in any supported
+;; (X)Emacs version? Alias them to the original functions and see if anyone
+;; reports a problem. If not, replace with original functions. --rsteib
+;;
+;; (defun gnus-y-or-n-p (prompt)
+;; (prog1
+;; (y-or-n-p prompt)
+;; (message "")))
+;; (defun gnus-yes-or-no-p (prompt)
+;; (prog1
+;; (yes-or-no-p prompt)
+;; (message "")))
+
+(defalias 'gnus-y-or-n-p 'y-or-n-p)
+(defalias 'gnus-yes-or-no-p 'yes-or-no-p)
;; By Frank Schmitt <ich@Frank-Schmitt.net>. Allows to have
;; age-depending date representations. (e.g. just the time if it's
@@ -654,6 +672,10 @@ If N, return the Nth ancestor instead."
(defvar gnus-work-buffer " *gnus work*")
+(declare-function gnus-get-buffer-create "gnus" (name))
+;; gnus.el requires mm-util.
+(declare-function mm-enable-multibyte "mm-util")
+
(defun gnus-set-work-buffer ()
"Put point in the empty Gnus work buffer."
(if (get-buffer gnus-work-buffer)
@@ -838,6 +860,9 @@ If there's no subdirectory, delete DIRECTORY as well."
(setq string (replace-match "" t t string)))
string)
+(declare-function gnus-put-text-property "gnus"
+ (start end property value &optional object))
+
(defsubst gnus-put-text-property-excluding-newlines (beg end prop val)
"The same as `put-text-property', but don't put this prop on any newlines in the region."
(save-match-data
@@ -849,6 +874,10 @@ If there's no subdirectory, delete DIRECTORY as well."
(setq beg (point)))
(gnus-put-text-property beg (point) prop val)))))
+(declare-function gnus-overlay-put "gnus" (overlay prop value))
+(declare-function gnus-make-overlay "gnus"
+ (beg end &optional buffer front-advance rear-advance))
+
(defsubst gnus-put-overlay-excluding-newlines (beg end prop val)
"The same as `put-text-property', but don't put this prop on any newlines in the region."
(save-match-data
@@ -987,6 +1016,9 @@ with potentially long computations."
(defvar rmail-default-rmail-file)
(defvar mm-text-coding-system)
+(declare-function mm-append-to-file "mm-util"
+ (start end filename &optional codesys inhibit))
+
(defun gnus-output-to-rmail (filename &optional ask)
"Append the current article to an Rmail file named FILENAME."
(require 'rmail)
@@ -1199,6 +1231,9 @@ Return the modified alist."
(throw 'found nil)))
t))
+;; gnus.el requires mm-util.
+(declare-function mm-disable-multibyte "mm-util")
+
(defun gnus-write-active-file (file hashtb &optional full-names)
;; `coding-system-for-write' should be `raw-text' or equivalent.
(let ((coding-system-for-write nnmail-active-file-coding-system))
@@ -1266,6 +1301,9 @@ Return the modified alist."
(pop l2))
l1))))
+(declare-function gnus-add-text-properties "gnus"
+ (start end properties &optional object))
+
(defun gnus-add-text-properties-when
(property value start end properties &optional object)
"Like `gnus-add-text-properties', only applied on where PROPERTY is VALUE."
@@ -1515,6 +1553,8 @@ CHOICE is a list of the choice char and help message at IDX."
(kill-buffer buf))
tchar))
+(declare-function w32-focus-frame "../term/w32-win" (frame))
+
(defun gnus-select-frame-set-input-focus (frame)
"Select FRAME, raise it, and set input focus, if possible."
(cond ((featurep 'xemacs)
diff --git a/lisp/gnus/gnus-uu.el b/lisp/gnus/gnus-uu.el
index 3a045c2c234..82a423ba3eb 100644
--- a/lisp/gnus/gnus-uu.el
+++ b/lisp/gnus/gnus-uu.el
@@ -1051,7 +1051,7 @@ When called interactively, prompt for REGEXP."
(unless state
(push 'middle state))
(mm-with-unibyte-buffer
- (insert-buffer gnus-original-article-buffer)
+ (insert-buffer-substring gnus-original-article-buffer)
(yenc-decode-region (point-min) (point-max))
(when (and (member 'begin state)
(file-exists-p gnus-uu-yenc-article-name))
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index bd96e52d65f..fc76fce86d7 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -30,6 +30,10 @@
(eval '(run-hooks 'gnus-load-hook))
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(require 'wid-edit)
(require 'mm-util)
@@ -3736,6 +3740,8 @@ server is native)."
"Return the prefix of the current group name."
(< 0 (length (gnus-group-real-prefix group))))
+(declare-function gnus-group-decoded-name "gnus-group" (string))
+
(defun gnus-summary-buffer-name (group)
"Return the summary buffer name of GROUP."
(concat "*Summary " (gnus-group-decoded-name group) "*"))
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 39595b767ad..a3721430819 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -27,6 +27,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(require 'format-spec)
(eval-when-compile
(require 'cl)
@@ -997,9 +1001,14 @@ This only works when `display-time' is enabled."
(autoload 'imap-range-to-message-set "imap")
(autoload 'nnheader-ms-strip-cr "nnheader"))
+(autoload 'gnus-compress-sequence "gnus-range")
+
(defvar mail-source-imap-file-coding-system 'binary
"Coding system for the crashbox made by `mail-source-fetch-imap'.")
+;; Autoloads will bring in imap before this is called.
+(declare-function imap-capability "imap" (&optional identifier buffer))
+
(defun mail-source-fetch-imap (source callback)
"Fetcher for imap sources."
(mail-source-bind (imap source)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 3aaa8c25745..4fba4fd630e 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -31,9 +31,11 @@
;;; Code:
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile
(require 'cl))
-
+
(require 'hashcash)
(require 'canlock)
(require 'mailheader)
@@ -2469,6 +2471,8 @@ Point is left at the beginning of the narrowed-to region."
(kill-region start (point))))
+(autoload 'Info-goto-node "info")
+
(defun message-info (&optional arg)
"Display the Message manual.
@@ -3696,6 +3700,8 @@ This function uses `mail-citation-hook' if that is non-nil."
(defvar gnus-extract-address-components)
+(autoload 'format-spec "format-spec")
+
(defun message-insert-formatted-citation-line (&optional from date)
"Function that inserts a formatted citation line.
@@ -7474,6 +7480,8 @@ If nil, the function bound in `text-mode-map' or `global-map' is executed."
:type '(choice (const nil)
function))
+(declare-function mail-abbrev-in-expansion-header-p "mailabbrev" ())
+
(defun message-tab ()
"Complete names according to `message-completion-alist'.
Execute function specified by `message-tab-body-function' when not in
diff --git a/lisp/gnus/mm-bodies.el b/lisp/gnus/mm-bodies.el
index 0560c51ba41..758925b5c8b 100644
--- a/lisp/gnus/mm-bodies.el
+++ b/lisp/gnus/mm-bodies.el
@@ -26,6 +26,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(require 'mm-util)
(require 'rfc2047)
(require 'mm-encode)
@@ -67,6 +71,9 @@ Valid encodings are `7bit', `8bit', `quoted-printable' and `base64'."
(const base64))))
:group 'mime)
+(autoload 'message-options-get "message")
+(declare-function message-options-set "message" (symbol value))
+
(defun mm-encode-body (&optional charset)
"Encode a body.
Should be called narrowed to the body that is to be encoded.
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 71ef9bcdf55..e2c23d9db5a 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -26,9 +26,14 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(require 'mail-parse)
(require 'mailcap)
(require 'mm-bodies)
+(require 'gnus-util)
(eval-when-compile (require 'cl)
(require 'term))
@@ -733,6 +738,8 @@ external if displayed external."
(mm-display-external
handle 'mailcap-save-binary-file)))))))))
+(declare-function gnus-configure-windows "gnus-win" (setting &optional force))
+
(defun mm-display-external (handle method)
"Display HANDLE using METHOD."
(let ((outbuf (current-buffer)))
@@ -990,7 +997,8 @@ external if displayed external."
(cond
;; Internally displayed part.
((mm-annotationp object)
- (delete-annotation object))
+ (if (featurep 'xemacs)
+ (delete-annotation object)))
((or (functionp object)
(and (listp object)
(eq (car object) 'lambda)))
@@ -1231,9 +1239,39 @@ PROMPT overrides the default one used to ask user for a file name."
(mm-save-part-to-file handle file)
file))))
+(defun mm-add-meta-html-tag (handle &optional charset)
+ "Add meta html tag to specify CHARSET of HANDLE in the current buffer.
+CHARSET defaults to the one HANDLE specifies. Existing meta tag that
+specifies charset will not be modified. Return t if meta tag is added
+or replaced."
+ (when (equal (mm-handle-media-type handle) "text/html")
+ (when (or charset
+ (setq charset (mail-content-type-get (mm-handle-type handle)
+ 'charset)))
+ (setq charset (format "\
+<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">" charset))
+ (let ((case-fold-search t))
+ (goto-char (point-min))
+ (if (re-search-forward "\
+<meta\\s-+http-equiv=[\"']?content-type[\"']?\\s-+content=[\"']\
+text/\\(\\sw+\\)\\(?:\;\\s-*charset=\\(.+?\\)\\)?[\"'][^>]*>" nil t)
+ (if (and (match-beginning 2)
+ (string-match "\\`html\\'" (match-string 1)))
+ ;; Don't modify existing meta tag.
+ nil
+ ;; Replace it with the one specifying charset.
+ (replace-match charset)
+ t)
+ (if (re-search-forward "<head>\\s-*" nil t)
+ (insert charset "\n")
+ (re-search-forward "<html\\(?:\\s-+[^>]+\\|\\s-*\\)>\\s-*" nil t)
+ (insert "<head>\n" charset "\n</head>\n"))
+ t)))))
+
(defun mm-save-part-to-file (handle file)
(mm-with-unibyte-buffer
(mm-insert-part handle)
+ (mm-add-meta-html-tag handle)
(let ((current-file-modes (default-file-modes)))
(set-default-file-modes mm-attachment-file-modes)
(unwind-protect
@@ -1250,6 +1288,7 @@ PROMPT overrides the default one used to ask user for a file name."
(read-string "Shell command on MIME part: " mm-last-shell-command)))
(mm-with-unibyte-buffer
(mm-insert-part handle)
+ (mm-add-meta-html-tag handle)
(let ((coding-system-for-write 'binary))
(shell-command-on-region (point-min) (point-max) command nil)))))
@@ -1490,6 +1529,8 @@ If RECURSIVE, search recursively."
(put-text-property 0 (length (car handle)) parameter value
(car handle))))
+(autoload 'mm-view-pkcs7 "mm-view")
+
(defun mm-possibly-verify-or-decrypt (parts ctl)
(let ((type (car ctl))
(subtype (cadr (split-string (car ctl) "/")))
diff --git a/lisp/gnus/mm-extern.el b/lisp/gnus/mm-extern.el
index 14e4c77dbed..784ea8c9297 100644
--- a/lisp/gnus/mm-extern.el
+++ b/lisp/gnus/mm-extern.el
@@ -27,6 +27,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(require 'mm-util)
@@ -90,6 +94,8 @@
(let (mm-extern-anonymous)
(mm-extern-anon-ftp handle)))
+(declare-function message-goto-body "message" (&optional interactivep))
+
(defun mm-extern-mail-server (handle)
(require 'message)
(let* ((params (cdr (mm-handle-type handle)))
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index edb7521dbf3..e6e5ea95d18 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -26,6 +26,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(require 'mail-prsvr)
@@ -913,6 +917,8 @@ But this is very much a corner case, so don't worry about it."
(when (featurep 'xemacs)
`(and (featurep 'mule) (mm-xemacs-find-mime-charset-1 ,begin ,end))))
+(declare-function mm-delete-duplicates "mm-util" (list))
+
(defun mm-find-mime-charset-region (b e &optional hack-charsets)
"Return the MIME charsets needed to encode the region between B and E.
nil means ASCII, a single-element list represents an appropriate MIME
@@ -1145,6 +1151,8 @@ If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'."
inhibit-file-name-handlers)))
(write-region start end filename append visit lockname)))
+(autoload 'gmm-write-region "gmm-utils")
+
;; It is not a MIME function, but some MIME functions use it.
(if (and (fboundp 'make-temp-file)
(ignore-errors
@@ -1236,6 +1244,8 @@ If SUFFIX is non-nil, add that at the end of the file name."
(if (eq (point) end) 'ascii (mm-guess-charset))
(goto-char point)))))
+(declare-function mm-detect-coding-region "mm-util" (start end))
+
(if (fboundp 'coding-system-get)
(defun mm-detect-mime-charset-region (start end)
"Detect MIME charset of the text in the region between START and END."
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index 52d47b728ef..610f53002c6 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -427,6 +427,8 @@ apply the face `mm-uu-extract'."
(list mm-dissect-disposition
(cons 'filename file-name)))))
+(defvar gnus-original-article-buffer) ; gnus.el
+
(defun mm-uu-yenc-extract ()
;; This might not be exactly correct, but we sure can't get the
;; binary data from the article buffer, since that's already in a
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index cb4f42dabcf..04e72dffa27 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -24,7 +24,8 @@
;;; Commentary:
;;; Code:
-
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(eval-when-compile (require 'cl))
(require 'mail-parse)
(require 'mailcap)
@@ -117,6 +118,11 @@
(defalias 'mm-inline-image 'mm-inline-image-xemacs)
(defalias 'mm-inline-image 'mm-inline-image-emacs)))
+;; External.
+(declare-function w3-do-setup "ext:w3" ())
+(declare-function w3-region "ext:w3-display" (st nd))
+(declare-function w3-prepare-buffer "ext:w3-display" (&rest args))
+
(defvar mm-w3-setup nil)
(defun mm-setup-w3 ()
(unless mm-w3-setup
@@ -201,6 +207,10 @@
(defvar mm-w3m-setup nil
"Whether gnus-article-mode has been setup to use emacs-w3m.")
+;; External.
+(declare-function w3m-detect-meta-charset "ext:w3m" ())
+(declare-function w3m-region "ext:w3m" (start end &optional url charset))
+
(defun mm-setup-w3m ()
"Setup gnus-article-mode to use emacs-w3m."
(unless mm-w3m-setup
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index 07dc1ab4ccb..cbd70cb2adb 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -27,6 +27,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(require 'smime)
@@ -216,6 +220,8 @@ Whether the passphrase is cached at all is controlled by
(quit))
result))
+(autoload 'gnus-completing-read-with-default "gnus-util")
+
(defun mml-smime-openssl-encrypt-query ()
;; todo: try dns/ldap automatically first, before prompting user
(let (certs done)
@@ -346,6 +352,10 @@ Whether the passphrase is cached at all is controlled by
(cons key-id mml-smime-epg-secret-key-id-list))
(copy-sequence passphrase)))))
+(declare-function epg-key-sub-key-list "ext:epg" (key))
+(declare-function epg-sub-key-capability "ext:epg" (sub-key))
+(declare-function epg-sub-key-validity "ext:epg" (sub-key))
+
(defun mml-smime-epg-find-usable-key (keys usage)
(catch 'found
(while keys
@@ -358,6 +368,12 @@ Whether the passphrase is cached at all is controlled by
(setq pointer (cdr pointer))))
(setq keys (cdr keys)))))
+(autoload 'mml-compute-boundary "mml")
+
+;; We require mm-decode, which requires mm-bodies, which autoloads
+;; message-options-get (!).
+(declare-function message-options-set "message" (symbol value))
+
(defun mml-smime-epg-sign (cont)
(let* ((inhibit-redisplay t)
(context (epg-make-context 'CMS))
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index c5b7796ffaf..14dc90940cd 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -25,6 +25,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(require 'mm-util)
(require 'mm-bodies)
(require 'mm-encode)
@@ -1315,6 +1319,12 @@ Should be adopted if code in `message-send-mail' is changed."
(defvar mml-preview-buffer nil)
+(autoload 'gnus-make-hashtable "gnus-util")
+(autoload 'widget-button-press "wid-edit" nil t)
+(declare-function widget-event-point "wid-edit" (event))
+;; If gnus-buffer-configuration is bound this is loaded.
+(declare-function gnus-configure-windows "gnus-win" (setting &optional force))
+
(defun mml-preview (&optional raw)
"Display current buffer with Gnus, in a new buffer.
If RAW, display a raw encoded MIME message.
diff --git a/lisp/gnus/mml1991.el b/lisp/gnus/mml1991.el
index be9981676e6..44efe6da668 100644
--- a/lisp/gnus/mml1991.el
+++ b/lisp/gnus/mml1991.el
@@ -28,6 +28,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile
(require 'cl)
(require 'mm-util))
@@ -39,6 +43,11 @@
(autoload 'quoted-printable-decode-region "qp")
(autoload 'quoted-printable-encode-region "qp")
+(autoload 'mm-decode-content-transfer-encoding "mm-bodies")
+(autoload 'mm-encode-content-transfer-encoding "mm-bodies")
+(autoload 'message-options-get "message")
+(autoload 'message-options-set "message")
+
(defvar mml1991-use mml2015-use
"The package used for PGP.")
@@ -111,6 +120,9 @@ Whether the passphrase is cached at all is controlled by
(insert-buffer-substring signature)
(goto-char (point-max)))))
+(declare-function mc-encrypt-generic "ext:mc-toplev"
+ (&optional recipients scheme start end from sign))
+
(defun mml1991-mailcrypt-encrypt (cont &optional sign)
(let ((text (current-buffer))
(mc-pgp-always-sign
@@ -161,6 +173,13 @@ Whether the passphrase is cached at all is controlled by
(eval-and-compile
(autoload 'gpg-sign-cleartext "gpg"))
+(declare-function gpg-sign-encrypt "ext:gpg"
+ (plaintext ciphertext result recipients &optional
+ passphrase sign-with-key armor textmode))
+(declare-function gpg-encrypt "ext:gpg"
+ (plaintext ciphertext result recipients &optional
+ passphrase armor textmode))
+
(defun mml1991-gpg-sign (cont)
(let ((text (current-buffer))
headers signature
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index 28d1929399e..95d119282ae 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -30,6 +30,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(require 'mm-decode)
(require 'mm-util)
@@ -38,6 +42,10 @@
(defvar mc-pgp-always-sign)
+(declare-function epg-check-configuration "ext:epg-config"
+ (config &optional minimum-version))
+(declare-function epg-configuration "ext:epg-config" ())
+
(defvar mml2015-use (or
(condition-case nil
(progn
@@ -396,6 +404,10 @@ Whether the passphrase is cached at all is controlled by
(insert (format "--%s--\n" boundary))
(goto-char (point-max))))
+;; We require mm-decode, which requires mm-bodies, which autoloads
+;; message-options-get (!).
+(declare-function message-options-set "message" (symbol value))
+
(defun mml2015-mailcrypt-encrypt (cont &optional sign)
(let ((mc-pgp-always-sign
(or mc-pgp-always-sign
@@ -1329,6 +1341,9 @@ If no one is selected, default secret key is used. "
;;; General wrapper
+(autoload 'gnus-buffer-live-p "gnus-util")
+(autoload 'gnus-get-buffer-create "gnus")
+
(defun mml2015-clean-buffer ()
(if (gnus-buffer-live-p mml2015-result-buffer)
(with-current-buffer mml2015-result-buffer
diff --git a/lisp/gnus/nndb.el b/lisp/gnus/nndb.el
index 70d395ba986..9e1bd3623dc 100644
--- a/lisp/gnus/nndb.el
+++ b/lisp/gnus/nndb.el
@@ -48,6 +48,12 @@
;; * make the backend TOUCH an article when marked as expireable (will
;; make article expire 'expiry' days after that moment).
+;;; Code:
+
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
;;-
;; Register nndb with known select methods.
@@ -55,8 +61,6 @@
(unless (assoc "nndb" gnus-valid-select-methods)
(gnus-declare-backend "nndb" 'mail 'respool 'address 'prompt-address))
-;;; Code:
-
(require 'nnmail)
(require 'nnheader)
(require 'nntp)
@@ -240,6 +244,9 @@ expiry mechanism."
(nndb-request-expire-articles-remote articles group server force)
(nndb-request-expire-articles-local articles group server force)))
+;; _Something_ defines it...
+(declare-function nndb-request-article "nndb" t t)
+
(deffoo nndb-request-move-article
(article group server accept-form &optional last move-is-internal)
"Move ARTICLE (a number) from GROUP on SERVER.
diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el
index bf82791fea6..8dc28a3eaf6 100644
--- a/lisp/gnus/nnfolder.el
+++ b/lisp/gnus/nnfolder.el
@@ -31,6 +31,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(require 'nnheader)
(require 'message)
(require 'nnmail)
@@ -429,6 +433,10 @@ the group. Then the marks file will be regenerated properly by Gnus.")
;; The article numbers are increasing, so this result is sorted.
(nreverse numbers)))))
+(autoload 'gnus-request-group "gnus-int")
+(declare-function gnus-request-create-group "gnus-int"
+ (group &optional gnus-command-method args))
+
(deffoo nnfolder-request-expire-articles (articles newsgroup
&optional server force)
(nnfolder-possibly-change-group newsgroup server)
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 11cb4bff55c..79783f535c3 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -251,6 +251,8 @@ on your system, you could say something like:
(skip-chars-forward " \t")
(buffer-substring (point) (point-at-eol)))
+(autoload 'ietf-drums-unfold-fws "ietf-drums")
+
(defun nnheader-parse-naked-head (&optional number)
;; This function unfolds continuation lines in this buffer
;; destructively. When this side effect is unwanted, use
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index e05c286b1ab..06e6db5f792 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -27,6 +27,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(require 'gnus) ; for macro gnus-kill-buffer, at least
@@ -35,6 +39,7 @@
(require 'gnus-util)
(require 'mail-source)
(require 'mm-util)
+(require 'gnus-int)
(eval-and-compile
(autoload 'gnus-add-buffer "gnus")
@@ -1315,6 +1320,9 @@ Eudora has a broken References line, but an OK In-Reply-To."
;;; Utility functions
+(declare-function gnus-activate-group "gnus-start"
+ (group &optional scan dont-check method))
+
(defun nnmail-do-request-post (accept-func &optional server)
"Utility function to directly post a message to an nnmail-derived group.
Calls ACCEPT-FUNC (which should be `nnchoke-request-accept-article')
@@ -1854,6 +1862,8 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
;; Compare the time with the current time.
(ignore-errors (time-less-p days (time-since time))))))))
+(declare-function gnus-group-mark-article-read "gnus-group" (group article))
+
(defun nnmail-expiry-target-group (target group)
;; Do not invoke this from nntp-server-buffer! At least nnfolder clears
;; that buffer if the nnfolder group isn't selected.
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el
index e7674168484..05c19c27ee1 100644
--- a/lisp/gnus/nnmaildir.el
+++ b/lisp/gnus/nnmaildir.el
@@ -61,6 +61,10 @@
)
]
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-and-compile
(require 'nnheader)
(require 'gnus)
@@ -884,7 +888,9 @@ by nnmaildir-request-article.")
pgname (nnmaildir--pgname nnmaildir--cur-server pgname)
group (symbol-value group)
ro (nnmaildir--param pgname 'read-only))
- (insert (nnmaildir--grp-name group) " ")
+ (insert (gnus-replace-in-string
+ (nnmaildir--grp-name group) " " "\\ " t)
+ " ")
(princ (nnmaildir--group-maxnum nnmaildir--cur-server group)
nntp-server-buffer)
(insert " ")
@@ -911,14 +917,17 @@ by nnmaildir-request-article.")
(insert " ")
(princ (nnmaildir--group-maxnum nnmaildir--cur-server group)
nntp-server-buffer)
- (insert " " gname "\n")))))
+ (insert " "
+ (gnus-replace-in-string gname " " "\\ " t)
+ "\n")))))
'group)
(defun nnmaildir-request-update-info (gname info &optional server)
(let ((group (nnmaildir--prepare server gname))
pgname flist always-marks never-marks old-marks dotfile num dir
markdirs marks mark ranges markdir article read end new-marks ls
- old-mmth new-mmth mtime mark-sym existing missing deactivate-mark)
+ old-mmth new-mmth mtime mark-sym existing missing deactivate-mark
+ article-list)
(catch 'return
(unless group
(setf (nnmaildir--srv-error nnmaildir--cur-server)
@@ -966,12 +975,13 @@ by nnmaildir-request-article.")
(setq ranges (assq mark-sym old-marks))
(if ranges (setq ranges (cdr ranges)))
(throw 'got-ranges nil))
+ (setq article-list nil)
(dolist (prefix (funcall ls markdir nil "\\`[^.]" 'nosort))
(setq article (nnmaildir--flist-art flist prefix))
(if article
- (setq ranges
- (gnus-add-to-range ranges
- `(,(nnmaildir--art-num article)))))))
+ (setq article-list
+ (cons (nnmaildir--art-num article) article-list))))
+ (setq ranges (gnus-add-to-range ranges (sort article-list '<))))
(if (eq mark-sym 'read) (setq read ranges)
(if ranges (setq marks (cons (cons mark-sym ranges) marks)))))
(gnus-info-set-read info (gnus-range-add read missing))
@@ -999,7 +1009,7 @@ by nnmaildir-request-article.")
(insert " ")
(princ (nnmaildir--group-maxnum nnmaildir--cur-server group)
nntp-server-buffer)
- (insert " " gname "\n")
+ (insert " " (gnus-replace-in-string gname " " "\\ " t) "\n")
t))))
(defun nnmaildir-request-create-group (gname &optional server args)
@@ -1161,7 +1171,7 @@ by nnmaildir-request-article.")
(insert "\t" (nnmaildir--nov-get-beg nov) "\t"
(nnmaildir--art-msgid article) "\t"
(nnmaildir--nov-get-mid nov) "\tXref: nnmaildir "
- gname ":")
+ (gnus-replace-in-string gname " " "\\ " t) ":")
(princ num nntp-server-buffer)
(insert "\t" (nnmaildir--nov-get-end nov) "\n"))))
(catch 'return
@@ -1433,6 +1443,8 @@ by nnmaildir-request-article.")
(defun nnmaildir-active-number (gname)
0)
+(declare-function gnus-group-mark-article-read "gnus-group" (group article))
+
(defun nnmaildir-request-expire-articles (ranges &optional gname server force)
(let ((no-force (not force))
(group (nnmaildir--prepare server gname))
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el
index f72166b0455..4a02690a3c5 100644
--- a/lisp/gnus/nnrss.el
+++ b/lisp/gnus/nnrss.el
@@ -27,6 +27,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(require 'gnus)
@@ -418,6 +422,8 @@ otherwise return nil."
nnrss-compatible-encoding-alist)))))
(mm-coding-system-p 'utf-8)))
+(declare-function w3-parse-buffer "ext:w3-parse" (&optional buff))
+
(defun nnrss-fetch (url &optional local)
"Fetch URL and put it in a the expected Lisp structure."
(mm-with-unibyte-buffer
@@ -784,6 +790,8 @@ which RSS 2.0 allows."
(push (list group nnrss-group-max) nnrss-server-data)))
(nnrss-save-server-data server))))
+(declare-function gnus-group-make-rss-group "gnus-group" (&optional url))
+
(defun nnrss-opml-import (opml-file)
"OPML subscriptions import.
Read the file and attempt to subscribe to each Feed in the file."
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index d152c2480ad..a48e8bc6cfe 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -314,7 +314,7 @@ Return the response string if optional second argument is non-nil."
(setq match-end (point))
(goto-char pop3-read-point)
(if (looking-at "-ERR")
- (error (buffer-substring (point) (- match-end 2)))
+ (error "%s" (buffer-substring (point) (- match-end 2)))
(if (not (looking-at "+OK"))
(progn (setq pop3-read-point match-end) nil)
(setq pop3-read-point match-end)
diff --git a/lisp/gnus/rfc1843.el b/lisp/gnus/rfc1843.el
index f27825b6d74..4820184d21a 100644
--- a/lisp/gnus/rfc1843.el
+++ b/lisp/gnus/rfc1843.el
@@ -34,6 +34,10 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
(require 'mm-util)
@@ -139,6 +143,10 @@ ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc"
(aset s (incf i) (+ v (if (< v 63) 64 98))))))
s))
+(autoload 'mail-header-parse-content-type "mail-parse")
+(autoload 'message-narrow-to-head "message")
+(declare-function message-fetch-field "message" (header &optional not-all))
+
(defun rfc1843-decode-article-body ()
"Decode HZ encoded text in the article body."
(if (string-match (concat "\\<\\(" rfc1843-newsgroups-regexp "\\)\\>")
diff --git a/lisp/gnus/sieve-manage.el b/lisp/gnus/sieve-manage.el
index 5cf14f7eb32..a4b763650c8 100644
--- a/lisp/gnus/sieve-manage.el
+++ b/lisp/gnus/sieve-manage.el
@@ -76,6 +76,9 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(or (require 'password-cache nil t)
(require 'password))
(eval-when-compile
@@ -193,6 +196,10 @@ Valid states are `closed', `initial', `nonauth', and `auth'.")
(when (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte nil)))
+(declare-function password-read "password-cache" (prompt &optional key))
+(declare-function password-cache-add "password-cache" (key password))
+(declare-function password-cache-remove "password-cache" (key))
+
;; Uses the dynamically bound `reason' variable.
(defvar reason)
(defun sieve-manage-interactive-login (buffer loginfunc)
diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el
index 31545c16044..105cadff081 100644
--- a/lisp/gnus/smime.el
+++ b/lisp/gnus/smime.el
@@ -121,6 +121,9 @@
;;; Code:
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
(require 'dig)
(or (require 'password-cache nil t)
(require 'password))
@@ -257,6 +260,7 @@ must be set in `ldap-host-parameters-alist'."
temporary-file-directory))))))
;; Password dialog function
+(declare-function password-read-and-add "password-cache" (prompt &optional key))
(defun smime-ask-passphrase (&optional cache-key)
"Asks the passphrase to unlock the secret key.
@@ -654,6 +658,8 @@ A string or a list of strings is returned."
(define-key smime-mode-map "q" 'smime-exit)
(define-key smime-mode-map "f" 'smime-certificate-info))
+(autoload 'gnus-run-mode-hooks "gnus-util")
+
(defun smime-mode ()
"Major mode for browsing, viewing and fetching certificates.
diff --git a/lisp/gnus/spam-stat.el b/lisp/gnus/spam-stat.el
index 5b57f376cf8..bba1c2a70e8 100644
--- a/lisp/gnus/spam-stat.el
+++ b/lisp/gnus/spam-stat.el
@@ -377,6 +377,8 @@ Use `spam-stat-ngood', `spam-stat-nbad', `spam-stat-good',
(spam-stat-buffer-words))
(setq spam-stat-dirty t))
+(autoload 'gnus-message "gnus-util")
+
(defun spam-stat-buffer-change-to-spam ()
"Consider current buffer no longer normal mail but spam."
(setq spam-stat-nbad (1+ spam-stat-nbad)
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index fddebb1d290..f2c18e71d0c 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -40,16 +40,20 @@
;;{{{ compilation directives and autoloads/requires
+;; For Emacs < 22.2.
+(eval-and-compile
+ (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
(eval-when-compile (require 'cl))
-(eval-when-compile (require 'spam-report))
-(eval-when-compile (require 'hashcash))
+(require 'message) ;for the message-fetch-field functions
(require 'gnus-sum)
-
(require 'gnus-uu) ; because of key prefix issues
;;; for the definitions of group content classification and spam processors
(require 'gnus)
-(require 'message) ;for the message-fetch-field functions
+
+(eval-when-compile (require 'spam-report))
+(eval-when-compile (require 'hashcash))
;; for nnimap-split-download-body-default
(eval-when-compile (require 'nnimap))
@@ -2066,6 +2070,9 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
(autoload 'bbdb-create-internal "bbdb")
(autoload 'bbdb-search-simple "bbdb"))
+;; Autoloaded in message, which we require.
+(declare-function gnus-extract-address-components "gnus-util" (from))
+
(eval-and-compile
(when (condition-case nil
(progn