* mime-image.el (mime-display-image): Set default umask to 077.
authorueno <ueno>
Mon, 21 Feb 2000 14:06:50 +0000 (14:06 +0000)
committerueno <ueno>
Mon, 21 Feb 2000 14:06:50 +0000 (14:06 +0000)
(mime-image-create): Use `nothing-image-instance-p'.

mime-image.el

index 469b126..3f88dcd 100644 (file)
@@ -56,7 +56,7 @@
                    (vector type (if data-p :data :file) file-or-data)
                  file-or-data)
                nil nil 'noerror)))
-         (if (eq 'nothing (image-instance-type instance)) nil
+         (if (nothing-image-instance-p instance) nil
            (make-glyph instance))))
 
       (defun mime-image-insert (image string &optional area)
   (let ((format (cdr (assq 'image-format situation)))
        (image-file
         (make-temp-name (expand-file-name "tm" temporary-file-directory)))
+       (orig-mode (default-file-modes))
        image)
     (unwind-protect
        (progn
+         (set-default-file-modes 448)
          (mime-write-entity-content entity image-file)
          (if (null (setq image (mime-image-create image-file format)))
              (message "Invalid glyph!")
                (set-window-buffer (selected-window)(current-buffer))
                (sit-for 0))
              (message "Decoding image... done"))))
+      (set-default-file-modes orig-mode)
       (condition-case nil
          (delete-file image-file)
        (error nil)))))