Fix byte-compiler warnings
authorhayashi <hayashi>
Wed, 9 Feb 2000 01:46:22 +0000 (01:46 +0000)
committerhayashi <hayashi>
Wed, 9 Feb 2000 01:46:22 +0000 (01:46 +0000)
ChangeLog
mime-play.el
mime-view.el

index 4321c83..ad9a90d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2000-02-08  Yoshiki Hayashi  <yoshiki@xemacs.org>
 
+       * mime-view.el: Fix byte-compiler warnings.
+       * mime-play.el: Ditto.
+       (mime-preview-quitting-method-for-mime-show-message-mode):
+       Check whether raw-buffer exists.
+
+2000-02-08  Yoshiki Hayashi  <yoshiki@xemacs.org>
+
        * Makefile: (texinfmt, xtexinfmt): New rule to format Texinfo
        file with Emacs and XEmacs.
 
index a114399..65c8988 100644 (file)
@@ -507,11 +507,13 @@ SUBTYPE is symbol to indicate subtype of media-type.")
 (defun mime-preview-quitting-method-for-mime-show-message-mode ()
   "Quitting method for mime-view.
 It is registered to variable `mime-preview-quitting-method-alist'."
-  (let ((raw-buffer (mime-entity-buffer
+  (let ((raw-buffer (mime-entity-body-buffer
                     (get-text-property (point-min) 'mime-view-entity)))
        (mother mime-mother-buffer)
        (win-conf mime-preview-original-window-configuration))
-    (kill-buffer raw-buffer)
+    ;; Existence of raw-buffer is not guaranteed.
+    (if raw-buffer
+       (kill-buffer raw-buffer))
     (mime-preview-kill-buffer)
     (set-window-configuration win-conf)
     (pop-to-buffer mother)))
@@ -596,7 +598,8 @@ It is registered to variable `mime-preview-quitting-method-alist'."
          (catch 'tag
            (save-excursion
              (set-buffer (get-buffer-create mime-temp-buffer-name))
-             (let ((full-buf (current-buffer)))
+             ;; #### ??? full-buf is not referenced.
+;;           (let ((full-buf (current-buffer)))
                (erase-buffer)
                (let ((i 1))
                  (while (<= i total)
@@ -624,7 +627,7 @@ It is registered to variable `mime-preview-quitting-method-alist'."
                             (mime-open-entity 'buffer (current-buffer))
                             nil mother nil 'mime-show-message-mode)))
                  (set-window-buffer pwin pbuf)
-                 (select-window pwin)))))))))
+                 (select-window pwin))))))))
 
 
 ;;; @ message/external-body
index 110d9ff..d6dfad4 100644 (file)
@@ -814,7 +814,7 @@ This can only handle gzipped contents."
   (let ((inhibit-read-only t)
        (entity (get-text-property (point) 'mime-view-entity))
        (situation (get-text-property (point) 'mime-view-situation))
-       start end)
+       start)
     (when (and entity
               (not (get-text-property (point) 'mime-view-entity-header))
               (not (memq (mime-entity-media-type entity)
@@ -858,7 +858,8 @@ With prefix, it prompts for coding-system."
        (coding (if ask-coding
                    (or (read-coding-system "Coding system: ")
                        'undecided)
-                 'undecided)))
+                 'undecided))
+       start)
     (when (and entity
               (not (get-text-property (point) 'mime-view-entity-header))
               (not (memq (mime-entity-media-type entity)
@@ -900,7 +901,7 @@ With prefix, it prompts for coding-system."
        (entity (get-text-property (point) 'mime-view-entity))
        (situation (get-text-property (point) 'mime-view-situation))
        (mime-view-force-inline-types t)
-       start end)
+       start)
     (when (and entity
               (not (get-text-property (point) 'mime-view-entity-header))
               (not (memq (mime-entity-media-type entity)
@@ -1093,7 +1094,7 @@ With prefix, it prompts for coding-system."
        (body-presentation-method
         (cdr (assq 'body-presentation-method situation)))
        (children (mime-entity-children entity))
-       e nb ne nhb nbb)
+       nb ne nhb nbb)
     ;; Check if attachment is specified.
     ;; if inline is forced or not.
     (unless (or (eq t mime-view-force-inline-types)
@@ -1113,12 +1114,12 @@ With prefix, it prompts for coding-system."
     (setq nb (point))
     (save-restriction
       (narrow-to-region nb nb)
-      (or button-is-invisible
-         (if (mime-view-entity-button-visible-p entity)
-             (mime-view-insert-entity-button entity
-                                             ;; work around composite type
-                                             (not (or children
-                                                      body-is-visible)))))
+      (if (and (not button-is-invisible)
+              (mime-view-entity-button-visible-p entity))
+         (mime-view-insert-entity-button entity
+                                         ;; work around composite type
+                                         (not (or children
+                                                  body-is-visible))))
       (when header-is-visible
        (setq nhb (point))
        (if header-presentation-method
@@ -1142,10 +1143,9 @@ With prefix, it prompts for coding-system."
                                               ;; work around composite type
                                               (not (or children
                                                        body-is-visible))))
-            (or header-is-visible
-                (progn
-                  (goto-char (point-max))
-                  (insert "\n")))))
+            (unless header-is-visible
+              (goto-char (point-max))
+              (insert "\n"))))
       (setq ne (point-max)))
     (put-text-property nb ne 'mime-view-entity entity)
     (put-text-property nb ne 'mime-view-situation situation)