From: ueno Date: Mon, 21 Feb 2000 14:06:50 +0000 (+0000) Subject: * mime-image.el (mime-display-image): Set default umask to 077. X-Git-Tag: emiko-1_13_11~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=9c03df890fe5ad3d1bb1a53db557bfc532fd8ffc;p=elisp%2Fsemi.git * mime-image.el (mime-display-image): Set default umask to 077. (mime-image-create): Use `nothing-image-instance-p'. --- diff --git a/mime-image.el b/mime-image.el index 469b126..3f88dcd 100644 --- a/mime-image.el +++ b/mime-image.el @@ -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) @@ -168,9 +168,11 @@ (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!") @@ -181,6 +183,7 @@ (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)))))