]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-file-noselect-1): Undo previous change.
authorRichard M. Stallman <rms@gnu.org>
Sat, 8 Jun 2002 18:28:06 +0000 (18:28 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 8 Jun 2002 18:28:06 +0000 (18:28 +0000)
lisp/ChangeLog
lisp/files.el

index f77e977f79812ae7545fe85efbbcd42bcced8604..df6177b542fbfe7852dcdbff7e84734d7ce1cabe 100644 (file)
@@ -1,5 +1,7 @@
 2002-06-08  Richard M. Stallman  <rms@gnu.org>
 
+       * files.el (find-file-noselect-1): Undo previous change.
+
        * bookmark.el (bookmark-file-or-variation-thereof): Doc fix.
 
 2002-06-07  Karl Fogel  <kfogel@red-bean.com>
index f6f787cff4d7e1bcc8986e8a1a2094285e522f74..34fdefd6da628746e88a5649d0f5b20b09798172 100644 (file)
@@ -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))))
 \f
 (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