From: Richard M. Stallman Date: Mon, 21 Jul 1997 06:16:33 +0000 (+0000) Subject: (find-file-literally): Temporarily remove tar-mode and X-Git-Tag: emacs-20.1~1052 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7c24fbd2342837f7021ec3fd3d264be1f5476d25;p=emacs.git (find-file-literally): Temporarily remove tar-mode and archive-mode from auto-mode-alist. --- 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." (interactive "FFind file literally: ") (let ((coding-system-for-read 'no-conversion) (coding-system-for-write 'no-conversion) + (auto-mode-alist (copy-sequence auto-mode-alist)) (jka-compr-compression-info-list nil) (format-alist nil) - (after-insert-file-functions nil)) + (after-insert-file-functions nil) + tail) + ;; Turn off use of tar-mode and archive-mode + ;; for this one file. (We copied auto-mode-alist above + ;; so as not to alter it permanently.) + (setq tail auto-mode-alist) + (while tail + (if (memq (cdr (car tail)) '(tar-mode archive-mode)) + (setq auto-mode-alist (delq (car tail) auto-mode-alist))) + (setq tail (cdr tail))) (prog1 (find-file filename) (setq enable-multibyte-characters nil))))