Merge from emacs--devo--0
authorMiles Bader <miles@gnu.org>
Sun, 16 Dec 2007 04:23:19 +0000 (04:23 +0000)
committerMiles Bader <miles@gnu.org>
Sun, 16 Dec 2007 04:23:19 +0000 (04:23 +0000)
Patches applied:

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

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

2007-12-11  Glenn Morris  <rgm@gnu.org>

   * 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: emacs@sv.gnu.org/gnus--devo--0--patch-428

30 files changed:
lisp/ChangeLog
lisp/gnus-cache.el
lisp/gnus-ems.el
lisp/gnus-fun.el
lisp/gnus-group.el
lisp/gnus-int.el
lisp/gnus-sum.el
lisp/gnus-util.el
lisp/gnus.el
lisp/mail-source.el
lisp/message.el
lisp/mm-bodies.el
lisp/mm-decode.el
lisp/mm-extern.el
lisp/mm-util.el
lisp/mm-uu.el
lisp/mml-smime.el
lisp/mml.el
lisp/mml1991.el
lisp/mml2015.el
lisp/nndb.el
lisp/nnfolder.el
lisp/nnheader.el
lisp/nnmail.el
lisp/nnmaildir.el
lisp/nnrss.el
lisp/rfc1843.el
lisp/smime.el
lisp/spam-stat.el
lisp/spam.el

index 18aeb3a..7ed9305 100644 (file)
        (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.
index 4f61a0f..72c8860 100644 (file)
 
 ;;; 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"))
index 79e513b..a49d46a 100644 (file)
   "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 0545496..e9c6d9f 100644 (file)
 
 ;;; 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)
index 5843214..73d6325 100644 (file)
 
 ;;; 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
index ac2b723..5c48f70 100644 (file)
@@ -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)
index f86cf22..62068d8 100644 (file)
@@ -2962,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" ())
+
 \f
 
 (defun gnus-summary-mode (&optional group)
@@ -6951,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."
@@ -9442,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
@@ -11797,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.
index ea9512d..56aacf0 100644 (file)
@@ -217,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)
@@ -665,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)
@@ -849,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
@@ -860,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
@@ -1213,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))
@@ -1280,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."
index 2681e53..57b6452 100644 (file)
 
 (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) "*"))
index 39595b7..a372143 100644 (file)
 
 ;;; 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)
index 919a4c0..4fba4fd 100644 (file)
@@ -2471,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.
 
@@ -3698,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.
 
index 557bd13..e7743d1 100644 (file)
 
 ;;; 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.
index 85e0264..e2c23d9 100644 (file)
 
 ;;; 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)))
@@ -1521,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) "/")))
index 14e4c77..784ea8c 100644 (file)
 
 ;;; 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)))
index 69dd40d..8a2e344 100644 (file)
 
 ;;; 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 @@ 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
@@ -1210,6 +1216,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
@@ -1301,6 +1309,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."
index 52d47b7..610f530 100644 (file)
@@ -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
index 07dc1ab..cbd70cb 100644 (file)
 
 ;;; 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))
index 092827c..ec37c2b 100644 (file)
 
 ;;; 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)
@@ -1316,6 +1320,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.
index be99816..44efe6d 100644 (file)
 
 ;;; 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))
 (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
index 28d1929..95d1192 100644 (file)
 
 ;;; 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)
 
 (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
index 70d395b..9e1bd36 100644 (file)
 ;; * 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.
index bf82791..8dc28a3 100644 (file)
 
 ;;; 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)
index 11cb4bf..79783f5 100644 (file)
@@ -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
index e05c286..06e6db5 100644 (file)
 
 ;;; 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.
index 829b376..05c19c2 100644 (file)
    )
 ]
 
+;; For Emacs < 22.2.
+(eval-and-compile
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+
 (eval-and-compile
   (require 'nnheader)
   (require 'gnus)
@@ -1439,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))
index f72166b..4a02690 100644 (file)
 
 ;;; 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."
index f27825b..4820184 100644 (file)
 
 ;;; 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 "\\)\\>")
index bd9ce5a..105cadf 100644 (file)
@@ -658,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.
 
index 5b57f37..bba1c2a 100644 (file)
@@ -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)
index fddebb1..f2c18e7 100644 (file)
 
 ;;{{{ 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