Fix dependency between mm-archive.el and mm-decode.el
authorKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 27 Mar 2012 07:15:30 +0000 (07:15 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 27 Mar 2012 07:15:30 +0000 (07:15 +0000)
Silence compiler warnings issued when compiling in Emacs source tree

lisp/ChangeLog
lisp/gnus-sync.el
lisp/mm-archive.el
lisp/mm-decode.el
lisp/nnimap.el
lisp/nnmail.el

index 4e5c7d6..54930b3 100644 (file)
@@ -1,3 +1,22 @@
+2012-03-27  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * gnus-sync.el (gnus-topic-alist, gnus-group-topic)
+       (gnus-topic-create-topic, gnus-topic-enter-dribble): Silence compiler.
+       (gnus-sync-read): Use mapc instead of mapcar.
+
+       * mm-archive.el: Require mm-decode for some macros.
+       (gnus-recursive-directory-files, mailcap-extension-to-mime): Silence
+       the byte compiler.
+       (mm-archive-decoders): New function that returns the value of
+       the mm-archive-decoders variable.
+
+       * mm-decode.el: Don't require mm-archive; autoload mm-archive functions
+       instead.
+       (mm-dissect-singlepart): Use the function mm-archive-decoders.
+
+       * nnimap.el (gnus-refer-thread-use-nnir):
+       * nnmail.el (mail-send-and-exit): Silence the byte compiler.
+
 2012-03-22  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-compat.el: Define `bound-and-true-p' for XEmacs.
index 6a45c67..7e13b88 100644 (file)
 (require 'gnus-start)
 (require 'gnus-util)
 
+(defvar gnus-topic-alist) ;; gnus-group.el
+(eval-when-compile
+  (autoload 'gnus-group-topic "gnus-topic")
+  (autoload 'gnus-topic-create-topic "gnus-topic" nil t)
+  (autoload 'gnus-topic-enter-dribble "gnus-topic"))
+
 (defgroup gnus-sync nil
   "The Gnus synchronization facility."
   :version "24.1"
@@ -810,24 +816,24 @@ With a prefix, SUBSCRIBE-ALL is set and unknown groups will be subscribed."
            (stringp (nth 1 gnus-sync-backend)))
       (let ((errored nil)
             name ftime)
-        (mapcar (lambda (entry)
-                  (setq name (cdr (assq 'id entry)))
-                  ;; set ftime the FIRST time through this loop, that
-                  ;; way it reflects the time we FINISHED reading
-                  (unless ftime (setq ftime (float-time)))
-
-                  (unless errored
-                    (setq errored
-                          (when (equal name
-                                       (gnus-sync-lesync-read-group-entry
-                                        (nth 1 gnus-sync-backend)
-                                        name
-                                        (cdr (assq 'value entry))
-                                        `(read-time ,ftime)
-                                        `(subscribe-all ,subscribe-all)))
-                            (gnus-sync-lesync-install-group-entry
-                             (cdr (assq 'id entry)))))))
-                (gnus-sync-lesync-groups-builder (nth 1 gnus-sync-backend)))))
+        (mapc (lambda (entry)
+               (setq name (cdr (assq 'id entry)))
+               ;; set ftime the FIRST time through this loop, that
+               ;; way it reflects the time we FINISHED reading
+               (unless ftime (setq ftime (float-time)))
+
+               (unless errored
+                 (setq errored
+                       (when (equal name
+                                    (gnus-sync-lesync-read-group-entry
+                                     (nth 1 gnus-sync-backend)
+                                     name
+                                     (cdr (assq 'value entry))
+                                     `(read-time ,ftime)
+                                     `(subscribe-all ,subscribe-all)))
+                         (gnus-sync-lesync-install-group-entry
+                          (cdr (assq 'id entry)))))))
+             (gnus-sync-lesync-groups-builder (nth 1 gnus-sync-backend)))))
 
      ((stringp gnus-sync-backend)
       ;; read data here...
index 5ca6616..7cfa465 100644 (file)
 
 ;;; Code:
 
+(require 'mm-decode)
+(eval-when-compile
+  (autoload 'gnus-recursive-directory-files "gnus-util")
+  (autoload 'mailcap-extension-to-mime "mailcap"))
+
 (defvar mm-archive-decoders
   '(("application/ms-tnef" t "tnef" "-f" "-" "-C")
     ("application/zip" nil "unzip" "-j" "-x" "%f" "-d")
     ("application/x-gtar-compressed" nil "tar" "xzf" "-" "-C")
     ("application/x-tar" nil "tar" "xf" "-" "-C")))
 
+(defun mm-archive-decoders () mm-archive-decoders)
+
 (defun mm-dissect-archive (handle)
   (let ((decoder (cddr (assoc (car (mm-handle-type handle))
                              mm-archive-decoders)))
index 0484d8a..19017d3 100644 (file)
@@ -29,7 +29,6 @@
 
 (require 'mail-parse)
 (require 'mm-bodies)
-(require 'mm-archive)
 (eval-when-compile (require 'cl)
                   (require 'term))
 
 (autoload 'mm-extern-cache-contents "mm-extern")
 (autoload 'mm-insert-inline "mm-view")
 
+(autoload 'mm-archive-decoders "mm-archive")
+(autoload 'mm-archive-dissect-and-inline "mm-archive")
+(autoload 'mm-dissect-archive "mm-archive")
+
 (defvar gnus-current-window-configuration)
 
 (add-hook 'gnus-exit-gnus-hook 'mm-destroy-postponed-undisplay-list)
@@ -672,7 +675,7 @@ Postpone undisplaying of viewers for types in
     (let ((handle
           (mm-make-handle
            (mm-copy-to-buffer) ctl cte nil cdl description nil id))
-         (decoder (assoc (car ctl) mm-archive-decoders)))
+         (decoder (assoc (car ctl) (mm-archive-decoders))))
       (if (and decoder
               ;; Do automatic decoding
               (cadr decoder)
index e94a98e..83100a5 100644 (file)
@@ -1656,6 +1656,7 @@ textual parts.")
   (setq nnimap-status-string "Read-only server")
   nil)
 
+(defvar gnus-refer-thread-use-nnir) ;; gnus-sum.el
 (declare-function gnus-fetch-headers "gnus-sum"
                  (articles &optional limit force-new dependencies))
 
index 988e1cd..1645f49 100644 (file)
@@ -40,6 +40,8 @@
 
 (autoload 'gnus-add-buffer "gnus")
 (autoload 'gnus-kill-buffer "gnus")
+(eval-when-compile
+  (autoload 'mail-send-and-exit "sendmail" nil t))
 
 (defgroup nnmail nil
   "Reading mail with Gnus."