]> git.eshelyaron.com Git - emacs.git/commitdiff
(insert-file-contents-literally): Allow it to be called within a magic file name
authorJuanma Barranquero <lekktu@gmail.com>
Wed, 7 May 2003 22:23:01 +0000 (22:23 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Wed, 7 May 2003 22:23:01 +0000 (22:23 +0000)
handler.

lisp/files.el

index 56f23043b10a9c389bda9ab9a4361f4be96c8921..9ee2349ae2723cb1f8d16b59539e4dc776f8e2cb 100644 (file)
@@ -1193,15 +1193,17 @@ This function ensures that none of these modifications will take place."
        (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)))))