Changes committed gnus/lisp (30 files)

"Miles Bader" <[email protected]>
Newsgroups gmane.emacs.gnus.commits
Message-ID <[email protected]>
Modified: ChangeLog gnus-cache.el gnus-ems.el gnus-fun.el gnus-group.el
          gnus-int.el gnus-sum.el gnus-util.el gnus.el mail-source.el
          message.el mm-bodies.el mm-decode.el mm-extern.el mm-util.el
          mm-uu.el mml-smime.el mml.el mml1991.el mml2015.el nndb.el
          nnfolder.el nnheader.el nnmail.el nnmaildir.el nnrss.el
          rfc1843.el smime.el spam-stat.el spam.el

Merge from emacs--devo--0

Patches applied:

 * emacs--devo--0  (patch 953, 955)

   - Update from CVS
   - Merge from gnus--devo--0

2007-12-11  Glenn Morris  <[email protected]>

   * lisp/gnus-cache.el: Require gnus-sum not just when compiling.

   * lisp/gnus-fun.el (gnus-display-x-face-in-from): Require gnus-art.

   * lisp/gnus-int.el (gnus-server-opened, gnus-status-message): Move
   definitions before use.

   * lisp/mm-decode.el: Require gnus-util.
   (mm-remove-part): Only call delete-annotation on XEmacs.

   * lisp/mm-uu.el (gnus-original-article-buffer): Define for compiler.

   * lisp/nnmail.el: Require gnus-int.

   * lisp/spam.el: Move `require's before `eval-when-compile's.

   * lisp/gnus-ems.el (gnus-alive-p):
   * lisp/gnus-fun.el (message-goto-eoh):
   * lisp/gnus-util.el (gnus-group-name-decode):
   * lisp/mail-source.el (gnus-compress-sequence):
   * lisp/message.el (Info-goto-node, format-spec):
   * lisp/mm-bodies.el (message-options-get):
   * lisp/mm-decode.el (mm-view-pkcs7):
   * lisp/mm-util.el (gmm-write-region):
   * lisp/mml-smime.el (mml-compute-boundary)
   (gnus-completing-read-with-default):
   * lisp/mml.el (widget-button-press, gnus-make-hashtable):
   * lisp/mml1991.el (mm-decode-content-transfer-encoding)
   (mm-encode-content-transfer-encoding)
   (message-options-get, message-options-set):
   * lisp/mml2015.el (gnus-buffer-live-p, gnus-get-buffer-create):
   * lisp/nnfolder.el (gnus-request-group):
   * lisp/nnheader.el (ietf-drums-unfold-fws):
   * lisp/rfc1843.el (mail-header-parse-content-type, message-narrow-to-head):
   * lisp/smime.el (gnus-run-mode-hooks):
   * lisp/spam-stat.el (gnus-message): Autoload.

   * lisp/gnus-cache.el, lisp/gnus-fun.el, lisp/gnus-group.el, lisp/gnus.el, lisp/mail-source.el:
   * lisp/mm-bodies.el, lisp/mm-decode.el, lisp/mm-extern.el, lisp/mm-util.el:
   * lisp/mml-smime.el, lisp/mml.el, lisp/mml1991.el, lisp/mml2015.el, lisp/nndb.el, lisp/nnfolder.el:
   * lisp/nnmail.el, lisp/nnmaildir.el, lisp/nnrss.el, lisp/rfc1843.el, lisp/spam.el:
   Add declare-function compatibility definition.

   * lisp/gnus-cache.el (nnvirtual-find-group-art):
   * lisp/gnus-fun.el (article-narrow-to-head, gnus-article-goto-header)
   (gnus-add-image, gnus-add-wash-type):
   * lisp/gnus-group.el (nnkiboze-score-file):
   * lisp/gnus-sum.el (turn-on-gnus-mailing-list-mode)
   (gnus-cache-write-active, mm-uu-dissect, idna-to-unicode):
   * lisp/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):
   * lisp/gnus.el (gnus-group-decoded-name):
   * lisp/mail-source.el (imap-capability):
   * lisp/mm-bodies.el (message-options-set):
   * lisp/mm-decode.el (gnus-configure-windows):
   * lisp/mm-extern.el (message-goto-body):
   * lisp/mm-util.el (mm-delete-duplicates, mm-detect-coding-region):
   * lisp/mml-smime.el (epg-key-sub-key-list, epg-sub-key-capability)
   (epg-sub-key-validity, message-options-set):
   * lisp/mml.el (widget-event-point, gnus-configure-windows):
   * lisp/mml1991.el (mc-encrypt-generic, gpg-sign-encrypt, gpg-encrypt):
   * lisp/mml2015.el (epg-check-configuration, epg-configuration)
   (message-options-set):
   * lisp/nndb.el (nndb-request-article):
   * lisp/nnfolder.el (gnus-request-create-group):
   * lisp/nnmail.el (gnus-activate-group, gnus-group-mark-article-read):
   * lisp/nnmaildir.el (gnus-group-mark-article-read):
   * lisp/nnrss.el (w3-parse-buffer, gnus-group-make-rss-group):
   * lisp/rfc1843.el (message-fetch-field):
   * lisp/spam.el (gnus-extract-address-components):
   Declare as functions.

Revision: [email protected]/gnus--devo--0--patch-428


Index: ChangeLog
diff -u gnus/lisp/ChangeLog:7.1709 gnus/lisp/ChangeLog:7.1710
--- ChangeLog:7.1709	Sun Dec 16 05:23:10 2007
+++ ChangeLog	Sun Dec 16 05:23:18 2007
@@ -33,6 +33,82 @@
 	(gnus-article-browse-html-parts): Work with message/external-body; use
 	mm-add-meta-html-tag.
 
+2007-12-11  Glenn Morris  <[email protected]>
+
+	* 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  <[email protected]>
 
 	* gnus-art.el (gnus-article-browse-html-parts): Decode CTE.
Index: gnus-cache.el
diff -u gnus/lisp/gnus-cache.el:7.23 gnus/lisp/gnus-cache.el:7.24
--- gnus-cache.el:7.23	Sat Nov 24 23:41:58 2007
+++ gnus-cache.el	Sun Dec 16 05:23:18 2007
@@ -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)
@@ -90,6 +95,8 @@
 (defvar gnus-cache-active-hashtb nil)
 (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")
Index: gnus-ems.el
diff -u gnus/lisp/gnus-ems.el:7.23 gnus/lisp/gnus-ems.el:7.24
--- gnus-ems.el:7.23	Sun Dec  9 01:04:20 2007
+++ gnus-ems.el	Sun Dec 16 05:23:19 2007
@@ -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)
Index: gnus-fun.el
diff -u gnus/lisp/gnus-fun.el:7.19 gnus/lisp/gnus-fun.el:7.20
--- gnus-fun.el:7.19	Sun Dec  9 01:04:21 2007
+++ gnus-fun.el	Sun Dec 16 05:23:18 2007
@@ -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 @@
 	 (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 @@
 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)
Index: gnus-group.el
diff -u gnus/lisp/gnus-group.el:7.104 gnus/lisp/gnus-group.el:7.105
--- gnus-group.el:7.104	Sun Dec  9 01:04:20 2007
+++ gnus-group.el	Sun Dec 16 05:23:18 2007
@@ -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 @@
      (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
Index: gnus-int.el
diff -u gnus/lisp/gnus-int.el:7.25 gnus/lisp/gnus-int.el:7.26
--- gnus-int.el:7.25	Wed Nov 28 21:32:49 2007
+++ gnus-int.el	Sun Dec 16 05:23:19 2007
@@ -58,6 +58,27 @@
 (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
 ;;;
@@ -314,26 +335,6 @@
   (let ((func (gnus-get-function gnus-command-method 'request-newgroups t)))
     (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."
Index: gnus-sum.el
diff -u gnus/lisp/gnus-sum.el:7.209 gnus/lisp/gnus-sum.el:7.210
--- gnus-sum.el:7.209	Sun Dec 16 05:23:10 2007
+++ gnus-sum.el	Sun Dec 16 05:23:18 2007
@@ -2962,6 +2962,9 @@
 	    (setq headers (cdr headers)))
 	  (list (nreverse outh))))))))
 
+
+(declare-function turn-on-gnus-mailing-list-mode "gnus-ml" ())
+
 
 
 (defun gnus-summary-mode (&optional group)
@@ -6951,6 +6954,8 @@
       (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."
@@ -9442,6 +9447,8 @@
   ;; 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
@@ -11797,6 +11804,7 @@
       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.
Index: gnus-util.el
diff -u gnus/lisp/gnus-util.el:7.73 gnus/lisp/gnus-util.el:7.74
--- gnus-util.el:7.73	Fri Dec 14 22:12:40 2007
+++ gnus-util.el	Sun Dec 16 05:23:18 2007
@@ -217,6 +217,13 @@
 		   (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)
@@ -665,6 +672,10 @@
 
 (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)
@@ -849,6 +860,9 @@
     (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
@@ -860,6 +874,10 @@
 	  (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
@@ -1213,6 +1231,9 @@
 	(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))
@@ -1279,6 +1300,9 @@
 		 (push (car l2) l1))
 	     (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)
Index: gnus.el
diff -u gnus/lisp/gnus.el:7.75 gnus/lisp/gnus.el:7.76
--- gnus.el:7.75	Sun Dec  9 01:04:21 2007
+++ gnus.el	Sun Dec 16 05:23:18 2007
@@ -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)
@@ -3735,6 +3739,8 @@
 (defun gnus-group-prefixed-p (group)
   "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."
Index: mail-source.el
diff -u gnus/lisp/mail-source.el:7.23 gnus/lisp/mail-source.el:7.24
--- mail-source.el:7.23	Sun Dec  9 01:04:21 2007
+++ mail-source.el	Sun Dec 16 05:23:18 2007
@@ -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,8 +1001,13 @@
   (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."
Index: message.el
diff -u gnus/lisp/message.el:7.235 gnus/lisp/message.el:7.236
--- message.el:7.235	Sun Dec  9 23:46:32 2007
+++ message.el	Sun Dec 16 05:23:18 2007
@@ -2471,6 +2471,8 @@
     (kill-region start (point))))
 
 
+(autoload 'Info-goto-node "info")
+
 (defun message-info (&optional arg)
   "Display the Message manual.
 
@@ -3697,6 +3699,8 @@
   (message-cite-original-1 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.
Index: mm-bodies.el
diff -u gnus/lisp/mm-bodies.el:7.16 gnus/lisp/mm-bodies.el:7.17
--- mm-bodies.el:7.16	Sun Dec  9 01:04:21 2007
+++ mm-bodies.el	Sun Dec 16 05:23:18 2007
@@ -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)
@@ -66,6 +70,9 @@
 			       (const quoted-printable)
 			       (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.
Index: mm-decode.el
diff -u gnus/lisp/mm-decode.el:7.58 gnus/lisp/mm-decode.el:7.59
--- mm-decode.el:7.58	Tue Dec 11 10:16:48 2007
+++ mm-decode.el	Sun Dec 16 05:23:18 2007
@@ -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 @@
 		(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 @@
 	(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)))
@@ -1520,6 +1528,8 @@
   (when handle
     (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))
Index: mm-extern.el
diff -u gnus/lisp/mm-extern.el:7.12 gnus/lisp/mm-extern.el:7.13
--- mm-extern.el:7.12	Thu Oct  4 20:51:28 2007
+++ mm-extern.el	Sun Dec 16 05:23:18 2007
@@ -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)
@@ -89,6 +93,8 @@
 (defun mm-extern-ftp (handle)
   (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)
Index: mm-util.el
diff -u gnus/lisp/mm-util.el:7.72 gnus/lisp/mm-util.el:7.73
--- mm-util.el:7.72	Sun Dec  9 01:04:21 2007
+++ mm-util.el	Sun Dec 16 05:23:18 2007
@@ -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)
 
@@ -960,6 +964,8 @@
   (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
@@ -1210,6 +1216,8 @@
 	   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
@@ -1300,6 +1308,8 @@
       (prog1
 	  (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)
Index: mm-uu.el
diff -u gnus/lisp/mm-uu.el:7.52 gnus/lisp/mm-uu.el:7.53
--- mm-uu.el:7.52	Sun Dec  9 01:04:21 2007
+++ mm-uu.el	Sun Dec 16 05:23:19 2007
@@ -427,6 +427,8 @@
 		      (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
Index: mml-smime.el
diff -u gnus/lisp/mml-smime.el:7.19 gnus/lisp/mml-smime.el:7.20
--- mml-smime.el:7.19	Sun Dec  9 01:04:21 2007
+++ mml-smime.el	Sun Dec 16 05:23:18 2007
@@ -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 @@
       (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 @@
 	      (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
@@ -357,6 +367,12 @@
 	      (throw 'found (car keys)))
 	  (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)
Index: mml.el
diff -u gnus/lisp/mml.el:7.56 gnus/lisp/mml.el:7.57
--- mml.el:7.56	Sun Dec  9 01:04:21 2007
+++ mml.el	Sun Dec 16 05:23:18 2007
@@ -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 @@
     (insert (message-make-mail-followup-to))))
 
 (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.
Index: mml1991.el
diff -u gnus/lisp/mml1991.el:7.23 gnus/lisp/mml1991.el:7.24
--- mml1991.el:7.23	Sun Dec  9 01:04:21 2007
+++ mml1991.el	Sun Dec 16 05:23:18 2007
@@ -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 @@
       (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
@@ -160,6 +172,13 @@
 
 (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))
Index: mml2015.el
diff -u gnus/lisp/mml2015.el:7.48 gnus/lisp/mml2015.el:7.49
--- mml2015.el:7.48	Sun Dec  9 01:04:21 2007
+++ mml2015.el	Sun Dec 16 05:23:18 2007
@@ -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 @@
     (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
@@ -1328,6 +1340,9 @@
     (goto-char (point-max))))
 
 ;;; 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)
Index: nndb.el
diff -u gnus/lisp/nndb.el:7.14 gnus/lisp/nndb.el:7.15
--- nndb.el:7.14	Thu Oct  4 20:51:28 2007
+++ nndb.el	Sun Dec 16 05:23:18 2007
@@ -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)
@@ -239,6 +243,9 @@
   (if nndb-server-side-expiry
       (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)
Index: nnfolder.el
diff -u gnus/lisp/nnfolder.el:7.19 gnus/lisp/nnfolder.el:7.20
--- nnfolder.el:7.19	Thu Oct  4 20:51:28 2007
+++ nnfolder.el	Sun Dec 16 05:23:18 2007
@@ -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)
@@ -428,6 +432,10 @@
 		(push newnum numbers))))
       ;; 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)
Index: nnheader.el
diff -u gnus/lisp/nnheader.el:7.29 gnus/lisp/nnheader.el:7.30
--- nnheader.el:7.29	Sun Dec  9 01:04:21 2007
+++ nnheader.el	Sun Dec 16 05:23:18 2007
@@ -251,6 +251,8 @@
   (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
Index: nnmail.el
diff -u gnus/lisp/nnmail.el:7.37 gnus/lisp/nnmail.el:7.38
--- nnmail.el:7.37	Sat Nov 24 23:41:58 2007
+++ nnmail.el	Sun Dec 16 05:23:18 2007
@@ -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 @@
 
 ;;; 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')
@@ -1853,6 +1861,8 @@
 	     (setq days (days-to-time days))
 	     ;; 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
Index: nnmaildir.el
diff -u gnus/lisp/nnmaildir.el:7.17 gnus/lisp/nnmaildir.el:7.18
--- nnmaildir.el:7.17	Sun Dec  9 01:04:21 2007
+++ nnmaildir.el	Sun Dec 16 05:23:18 2007
@@ -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)
@@ -1438,6 +1442,8 @@
 
 (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))
Index: nnrss.el
diff -u gnus/lisp/nnrss.el:7.53 gnus/lisp/nnrss.el:7.54
--- nnrss.el:7.53	Sun Dec  9 01:04:21 2007
+++ nnrss.el	Sun Dec 16 05:23:19 2007
@@ -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 @@
 					 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
@@ -783,6 +789,8 @@
 	    (setcar (cdr pair) nnrss-group-max)
 	  (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.
Index: rfc1843.el
diff -u gnus/lisp/rfc1843.el:7.9 gnus/lisp/rfc1843.el:7.10
--- rfc1843.el:7.9	Thu Oct  4 20:51:28 2007
+++ rfc1843.el	Sun Dec 16 05:23:18 2007
@@ -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)
 
@@ -138,6 +142,10 @@
 	  (setq v (% v 157))
 	  (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."
Index: smime.el
diff -u gnus/lisp/smime.el:7.26 gnus/lisp/smime.el:7.27
--- smime.el:7.26	Sun Dec  9 23:46:32 2007
+++ smime.el	Sun Dec 16 05:23:18 2007
@@ -658,6 +658,8 @@
   (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.
 
Index: spam-stat.el
diff -u gnus/lisp/spam-stat.el:7.28 gnus/lisp/spam-stat.el:7.29
--- spam-stat.el:7.28	Thu Oct  4 20:51:28 2007
+++ spam-stat.el	Sun Dec 16 05:23:19 2007
@@ -377,6 +377,8 @@
    (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)
Index: spam.el
diff -u gnus/lisp/spam.el:7.96 gnus/lisp/spam.el:7.97
--- spam.el:7.96	Sun Dec  9 01:04:21 2007
+++ spam.el	Sun Dec 16 05:23:18 2007
@@ -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))
@@ -2065,6 +2069,9 @@
   (autoload 'bbdb-buffer "bbdb")
   (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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.