aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2002-06-08 18:28:06 +0000
committerRichard M. Stallman <[email protected]>2002-06-08 18:28:06 +0000
commitf402ba38f52d407923f47a18372f84e2ad794ae7 (patch)
treedf4d83cd0019f81f48e16a089b43250360f00b2f /lisp
parentfe1d72d007a9dc16caa8da74dfae0270a531adb0 (diff)
(find-file-noselect-1): Undo previous change.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/files.el25
2 files changed, 16 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f77e977f79..df6177b542 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,7 @@
2002-06-08 Richard M. Stallman <[email protected]>
+ * files.el (find-file-noselect-1): Undo previous change.
+
* bookmark.el (bookmark-file-or-variation-thereof): Doc fix.
2002-06-07 Karl Fogel <[email protected]>
diff --git a/lisp/files.el b/lisp/files.el
index f6f787cff4..34fdefd6da 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1286,15 +1286,14 @@ that are visiting the various files."
(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 @@ non-nil, it is called instead of rereading visited file contents."
(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