changeset 45676:3e4be661bcb0

(find-file-noselect-1): Undo previous change.
author Richard M. Stallman <rms@gnu.org>
date Sat, 08 Jun 2002 18:27:16 +0000
parents 9af38e461835
children 81a570c4be20
files lisp/files.el
diffstat 1 files changed, 14 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Sat Jun 08 11:34:57 2002 +0000
+++ b/lisp/files.el	Sat Jun 08 18:27:16 2002 +0000
@@ -1286,15 +1286,14 @@
 	   (progn
 	     (make-local-variable 'backup-inhibited)
 	     (setq backup-inhibited t)))
-      (let ((buffer (current-buffer)))
-	(if rawfile
-	    (progn
-	      (set-buffer-multibyte nil)
-	      (setq buffer-file-coding-system 'no-conversion)
-	      (make-local-variable 'find-file-literally)
-	      (setq find-file-literally t))
-	  (after-find-file error (not nowarn)))
-	buffer))))
+      (if rawfile
+	  (progn
+	    (set-buffer-multibyte nil)
+	    (setq buffer-file-coding-system 'no-conversion)
+	    (make-local-variable 'find-file-literally)
+	    (setq find-file-literally t))
+	(after-find-file error (not nowarn)))
+      (current-buffer))))
 
 (defun insert-file-contents-literally (filename &optional visit beg end replace)
   "Like `insert-file-contents', but only reads in the file literally.
@@ -3223,8 +3222,12 @@
 			  (if auto-save-p 'emacs-mule-unix
 			    coding-system-for-read)))
 		     ;; Note that this preserves point in an intelligent way.
-		     (insert-file-contents file-name (not auto-save-p)
-					   nil nil t))))
+		     (if preserve-modes
+			 (let ((buffer-file-formats buffer-file-formats))
+			   (insert-file-contents file-name (not auto-save-p)
+						 nil nil t))
+		       (insert-file-contents file-name (not auto-save-p)
+					     nil nil t)))))
 	       ;; Recompute the truename in case changes in symlinks
 	       ;; have changed the truename.
 	       (setq buffer-file-truename