summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-06-23 07:06:02 +0000
committerGerd Moellmann <gerd@gnu.org>2000-06-23 07:06:02 +0000
commit78c56e706293a2a91660def4cab1f842b083e29a (patch)
tree3ade9dd237d67b3e11110f9c16ac94236255d386
parentdb7ae45bd7d6bee6123c4fd9956316e787d557bb (diff)
downloademacs-78c56e706293a2a91660def4cab1f842b083e29a.tar.gz
(emerge-make-temp-file): Make sure file has proper
permissions from birth.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/emerge.el8
2 files changed, 14 insertions, 2 deletions
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 <gerd@gnu.org>
+ * 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 <eggert@twinsun.com>
+
+ * emerge.el (emerge-make-temp-file): Make sure file has proper
+ permissions from birth.
+
2000-06-22 Eli Zaretskii <eliz@is.elta.co.il>
* 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.