From: Gerd Moellmann Date: Fri, 23 Jun 2000 07:06:02 +0000 (+0000) Subject: (emerge-make-temp-file): Make sure file has proper X-Git-Tag: emacs-pretest-21.0.90~3116 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=78c56e706293a2a91660def4cab1f842b083e29a;p=emacs.git (emerge-make-temp-file): Make sure file has proper permissions from birth. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1955414dda1..8dc9b506119 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2000-06-23 Gerd Moellmann + * comint.el (comint-substitute-in-file-name): Call replace-match + with second and third arg t. + * cus-edit.el (custom-button-face, custom-button-pressed-face): Specify foreground color. @@ -23,6 +26,11 @@ * pcomplete.el: New file. +2000-06-23 Paul Eggert + + * emerge.el (emerge-make-temp-file): Make sure file has proper + permissions from birth. + 2000-06-22 Eli Zaretskii * files.el (make-backup-file-name-1): On DOS/Windows, run the diff --git a/lisp/emerge.el b/lisp/emerge.el index b876c1c1192..332c8b46995 100644 --- a/lisp/emerge.el +++ b/lisp/emerge.el @@ -2907,8 +2907,12 @@ keymap. Leaves merge in fast mode." ;; Make a temporary file that only we have access to. ;; PREFIX is appended to emerge-temp-file-prefix to make the filename prefix. (defun emerge-make-temp-file (prefix) - (let ((f (make-temp-file (concat emerge-temp-file-prefix prefix)))) - (set-file-modes f emerge-temp-file-mode) + (let (f (old-modes (default-file-modes))) + (unwind-protect + (progn + (set-default-file-modes emerge-temp-file-mode) + (setq f (make-temp-file (concat emerge-temp-file-prefix prefix)))) + (set-default-file-modes old-modes)) f)) ;;; Functions that query the user before he can write out the current buffer.