Commit 5fc196af authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(find-file-literally): New function.

parent 4e2aade1
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment