From: tomo Date: Fri, 4 Jun 1999 10:32:14 +0000 (+0000) Subject: (insert-file-contents-literally): Treat file as binary; call X-Git-Tag: r21-2-15-tomo-1~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bafb3afeea5535db5d03df0209295068282d9e74;p=chise%2Fxemacs-chise.git- (insert-file-contents-literally): Treat file as binary; call file-name-handlers. [sync with Emacs 20.3.10] --- diff --git a/lisp/files.el b/lisp/files.el index 186043f..4f41c82 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -864,14 +864,17 @@ If there is no such live buffer, return nil." found)))) (defun insert-file-contents-literally (filename &optional visit beg end replace) - "Like `insert-file-contents', q.v., but only reads in the file. + "Like `insert-file-contents', q.v., but only reads in the file literally. A buffer may be modified in several ways after reading into the buffer due -to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ((file-name-handler-alist nil) - (format-alist nil) +to advanced Emacs features, such as format decoding, character code +conversion,find-file-hooks, automatic uncompression, etc. + +This function ensures that none of these modifications will take place." + (let ((format-alist nil) (after-insert-file-functions nil) + (coding-system-for-read 'binary) + (coding-system-for-write 'binary) + (jka-compr-compression-info-list nil) (find-buffer-file-type-function (if (fboundp 'find-buffer-file-type) (symbol-function 'find-buffer-file-type)