889 |
`find-file-hooks', etc. |
`find-file-hooks', etc. |
890 |
If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'. |
If INHIBIT is non-nil, inhibit `mm-inhibit-file-name-handlers'. |
891 |
This function ensures that none of these modifications will take place." |
This function ensures that none of these modifications will take place." |
892 |
(let ((format-alist nil) |
(let* ((format-alist nil) |
893 |
(auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) |
(auto-mode-alist (if inhibit nil (mm-auto-mode-alist))) |
894 |
(default-major-mode 'fundamental-mode) |
(default-major-mode 'fundamental-mode) |
895 |
(enable-local-variables nil) |
(enable-local-variables nil) |
896 |
(after-insert-file-functions nil) |
(after-insert-file-functions nil) |
897 |
(enable-local-eval nil) |
(enable-local-eval nil) |
898 |
(find-file-hooks nil) |
(inhibit-file-name-operation (if inhibit |
899 |
(inhibit-file-name-operation (if inhibit |
'insert-file-contents |
900 |
'insert-file-contents |
inhibit-file-name-operation)) |
901 |
inhibit-file-name-operation)) |
(inhibit-file-name-handlers |
902 |
(inhibit-file-name-handlers |
(if inhibit |
903 |
(if inhibit |
(append mm-inhibit-file-name-handlers |
904 |
(append mm-inhibit-file-name-handlers |
inhibit-file-name-handlers) |
905 |
inhibit-file-name-handlers) |
inhibit-file-name-handlers)) |
906 |
inhibit-file-name-handlers))) |
(ffh (if (boundp 'find-file-hook) |
907 |
(insert-file-contents filename visit beg end replace))) |
'find-file-hook |
908 |
|
'find-file-hooks)) |
909 |
|
(val (symbol-value ffh))) |
910 |
|
(set ffh nil) |
911 |
|
(unwind-protect |
912 |
|
(insert-file-contents filename visit beg end replace) |
913 |
|
(set ffh val)))) |
914 |
|
|
915 |
(defun mm-append-to-file (start end filename &optional codesys inhibit) |
(defun mm-append-to-file (start end filename &optional codesys inhibit) |
916 |
"Append the contents of the region to the end of file FILENAME. |
"Append the contents of the region to the end of file FILENAME. |