diff options
| author | Richard M. Stallman | 1997-07-08 09:57:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-08 09:57:37 +0000 |
| commit | 5fc196afb06ebcaef2475b5995f7b8717aadeeb2 (patch) | |
| tree | 6b6f921990cb87425fd8026737c9d3f113adae68 | |
| parent | 4e2aade12476c95329a65e32a3f85c6b5b3fea8f (diff) | |
| download | emacs-5fc196afb06ebcaef2475b5995f7b8717aadeeb2.tar.gz emacs-5fc196afb06ebcaef2475b5995f7b8717aadeeb2.zip | |
(find-file-literally): New function.
| -rw-r--r-- | lisp/files.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el index c794719964c..d2557e4bee7 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" | |||
| 943 | (after-find-file error (not nowarn)) | 943 | (after-find-file error (not nowarn)) |
| 944 | (setq buf (current-buffer))))) | 944 | (setq buf (current-buffer))))) |
| 945 | buf))) | 945 | buf))) |
| 946 | |||
| 947 | (defun find-file-literally (filename) | ||
| 948 | "Visit file FILENAME with no conversion of any kind. | ||
| 949 | Format conversion and character code conversion are both disabled, | ||
| 950 | and multibyte characters are disabled in the resulting buffer. | ||
| 951 | Automatic uncompression is also disabled." | ||
| 952 | (interactive "FFind file literally: ") | ||
| 953 | (let ((coding-system-for-read 'no-conversion) | ||
| 954 | (coding-system-for-write 'no-conversion) | ||
| 955 | (jka-compr-compression-info-list nil) | ||
| 956 | (format-alist nil) | ||
| 957 | (after-insert-file-functions nil)) | ||
| 958 | (prog1 | ||
| 959 | (find-file filename) | ||
| 960 | (setq enable-multibyte-characters nil)))) | ||
| 946 | 961 | ||
| 947 | (defvar after-find-file-from-revert-buffer nil) | 962 | (defvar after-find-file-from-revert-buffer nil) |
| 948 | 963 | ||