diff options
| author | Richard M. Stallman | 1997-07-21 06:16:33 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-07-21 06:16:33 +0000 |
| commit | 7c24fbd2342837f7021ec3fd3d264be1f5476d25 (patch) | |
| tree | 325be0afa60eb055aa8ec7a2a0f2a79e90d4c941 /lisp | |
| parent | 824974dfa488298ea687eb7b1ba900dbd51079ed (diff) | |
| download | emacs-7c24fbd2342837f7021ec3fd3d264be1f5476d25.tar.gz emacs-7c24fbd2342837f7021ec3fd3d264be1f5476d25.zip | |
(find-file-literally): Temporarily remove tar-mode and
archive-mode from auto-mode-alist.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/files.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/files.el b/lisp/files.el index c142778cd4e..e11017d4fd3 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -954,9 +954,19 @@ Automatic uncompression is also disabled." | |||
| 954 | (interactive "FFind file literally: ") | 954 | (interactive "FFind file literally: ") |
| 955 | (let ((coding-system-for-read 'no-conversion) | 955 | (let ((coding-system-for-read 'no-conversion) |
| 956 | (coding-system-for-write 'no-conversion) | 956 | (coding-system-for-write 'no-conversion) |
| 957 | (auto-mode-alist (copy-sequence auto-mode-alist)) | ||
| 957 | (jka-compr-compression-info-list nil) | 958 | (jka-compr-compression-info-list nil) |
| 958 | (format-alist nil) | 959 | (format-alist nil) |
| 959 | (after-insert-file-functions nil)) | 960 | (after-insert-file-functions nil) |
| 961 | tail) | ||
| 962 | ;; Turn off use of tar-mode and archive-mode | ||
| 963 | ;; for this one file. (We copied auto-mode-alist above | ||
| 964 | ;; so as not to alter it permanently.) | ||
| 965 | (setq tail auto-mode-alist) | ||
| 966 | (while tail | ||
| 967 | (if (memq (cdr (car tail)) '(tar-mode archive-mode)) | ||
| 968 | (setq auto-mode-alist (delq (car tail) auto-mode-alist))) | ||
| 969 | (setq tail (cdr tail))) | ||
| 960 | (prog1 | 970 | (prog1 |
| 961 | (find-file filename) | 971 | (find-file filename) |
| 962 | (setq enable-multibyte-characters nil)))) | 972 | (setq enable-multibyte-characters nil)))) |