changeset 18676:3980293d3bbd

(find-file-literally): New function.
author Richard M. Stallman <rms@gnu.org>
date Tue, 08 Jul 1997 09:57:37 +0000
parents a22ef14d16f8
children 7648eb8e46d2
files lisp/files.el
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Tue Jul 08 09:47:23 1997 +0000
+++ b/lisp/files.el	Tue Jul 08 09:57:37 1997 +0000
@@ -943,6 +943,21 @@
 	    (after-find-file error (not nowarn))
 	    (setq buf (current-buffer)))))
       buf)))
+
+(defun find-file-literally (filename) 
+  "Visit file FILENAME with no conversion of any kind.
+Format conversion and character code conversion are both disabled,
+and multibyte characters are disabled in the resulting buffer.
+Automatic uncompression is also disabled."
+  (interactive "FFind file literally: ")
+  (let ((coding-system-for-read 'no-conversion)
+	(coding-system-for-write 'no-conversion)
+	(jka-compr-compression-info-list nil)
+	(format-alist nil)
+	(after-insert-file-functions nil))
+    (prog1
+	(find-file filename)
+      (setq enable-multibyte-characters nil))))
 
 (defvar after-find-file-from-revert-buffer nil)