From 5fc196afb06ebcaef2475b5995f7b8717aadeeb2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 8 Jul 1997 09:57:37 +0000 Subject: (find-file-literally): New function. --- lisp/files.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lisp') diff --git a/lisp/files.el b/lisp/files.el index c794719964..d2557e4bee 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -943,6 +943,21 @@ Optional second arg RAWFILE non-nil means the file is read literally" (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) -- cgit v1.2.3