# HG changeset patch # User Juanma Barranquero # Date 1052344704 0 # Node ID 4d3efb8f1498efd4ef129e02c934a7ac235a1f22 # Parent 7b95d60a757410b2baac2aee059060d55028efcb (insert-file-contents-literally): Allow it to be called within a magic file name handler. diff -r 7b95d60a7574 -r 4d3efb8f1498 lisp/files.el --- a/lisp/files.el Wed May 07 21:56:43 2003 +0000 +++ b/lisp/files.el Wed May 07 21:58:24 2003 +0000 @@ -803,7 +803,7 @@ default-coding)) (setq from-coding (read-coding-system (format "Recode filename %s from: " filename)))) - + ;; We provide the default coding only when a user is going to ;; change the encoding not from the default coding. (if (eq from-coding default-coding) @@ -1412,15 +1412,17 @@ (coding-system-for-read 'no-conversion) (coding-system-for-write 'no-conversion) (find-buffer-file-type-function - (if (fboundp 'find-buffer-file-type) - (symbol-function 'find-buffer-file-type) - nil)) - (inhibit-file-name-handlers '(jka-compr-handler image-file-handler)) - (inhibit-file-name-operation 'insert-file-contents)) + (if (fboundp 'find-buffer-file-type) + (symbol-function 'find-buffer-file-type) + nil)) + (inhibit-file-name-handlers + (append '(jka-compr-handler image-file-handler) + inhibit-file-name-handlers)) + (inhibit-file-name-operation 'insert-file-contents)) (unwind-protect - (progn - (fset 'find-buffer-file-type (lambda (filename) t)) - (insert-file-contents filename visit beg end replace)) + (progn + (fset 'find-buffer-file-type (lambda (filename) t)) + (insert-file-contents filename visit beg end replace)) (if find-buffer-file-type-function (fset 'find-buffer-file-type find-buffer-file-type-function) (fmakunbound 'find-buffer-file-type)))))