[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/files.el,v
From: |
Richard M. Stallman |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/files.el,v |
Date: |
Mon, 19 Jun 2006 21:48:41 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Richard M. Stallman <rms> 06/06/19 21:48:41
Index: files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.845
retrieving revision 1.846
diff -u -b -r1.845 -r1.846
--- files.el 16 Jun 2006 15:14:40 -0000 1.845
+++ files.el 19 Jun 2006 21:48:41 -0000 1.846
@@ -1514,23 +1514,53 @@
;; hexl-mode.
(not (eq major-mode 'hexl-mode)))
(if (buffer-modified-p)
- (if (y-or-n-p (if rawfile
- "Save file and revisit literally? "
- "Save file and revisit non-literally? "))
+ (if (y-or-n-p
+ (format
+ (if rawfile
+ "The file %s is already visited normally,
+and you have edited the buffer. Now you have asked to visit it literally,
+meaning no coding system handling, format conversion, or local variables.
+Emacs can only visit a file in one way at a time.
+
+Do you want to save the file, and visit it literally instead? "
+ "The file %s is already visited literally,
+meaning no coding system handling, format conversion, or local variables.
+You have edited the buffer. Now you have asked to visit the file normally,
+but Emacs can only visit a file in one way at a time.
+
+Do you want to save the file, and visit it normally instead? ")
+ (file-name-nondirectory filename)))
(progn
(save-buffer)
(find-file-noselect-1 buf filename nowarn
rawfile truename number))
- (if (y-or-n-p (if rawfile
- "Discard your edits and revisit file
literally? "
- "Discard your edits and revisit file
non-literally? "))
+ (if (y-or-n-p
+ (format
+ (if rawfile
+ "\
+Do you want to discard your changes, and visit the file literally now? "
+ "\
+Do you want to discard your changes, and visit the file normally now? ")))
(find-file-noselect-1 buf filename nowarn
rawfile truename number)
(error (if rawfile "File already visited
non-literally"
"File already visited literally"))))
- (if (y-or-n-p (if rawfile
- "Revisit file literally? "
- "Revisit file non-literally? "))
+ (if (y-or-n-p
+ (format
+ (if rawfile
+ "The file %s is already visited normally.
+You have asked to visit it literally,
+meaning no coding system decoding, format conversion, or local variables.
+But Emacs can only visit a file in one way at a time.
+
+Do you want to revisit the file literally now? "
+ "The file %s is already visited literally,
+meaning no coding system decoding, format conversion, or local variables.
+You have asked to visit it normally,
+but Emacs can only visit a file in one way at a time.
+
+Do you want to revisit the file normally now? ")
+ (file-name-nondirectory filename)))
(find-file-noselect-1 buf filename nowarn
rawfile truename number)
(error (if rawfile "File already visited non-literally"
@@ -3631,7 +3661,8 @@
;; Since we have created an entirely new file,
;; make sure it gets the right permission bits set.
(setq setmodes (or setmodes
- (cons (or (file-modes buffer-file-name) umask)
+ (cons (or (file-modes buffer-file-name)
+ (logand ?\666 umask))
buffer-file-name)))
;; We succeeded in writing the temp file,
;; so rename it.
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Kenichi Handa, 2006/06/06
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Thien-Thi Nguyen, 2006/06/12
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Richard M. Stallman, 2006/06/16
- [Emacs-diffs] Changes to emacs/lisp/files.el,v,
Richard M. Stallman <=
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Chong Yidong, 2006/06/20
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Eli Zaretskii, 2006/06/23