<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,6 +2,36 @@
 
 	* Makefile (dist, debprepare): Use git instead of tla.
 
+	* contrib/httpd.el (httpd-send-file): Use insert-file-contents.
+
+	* examples/mwolson/muse-init.el (my-muse-prepare-entry-for-xanga):
+	Use muse-insert-file-contents.
+
+	* experimental/muse-split.el (muse-publish-file)
+	(muse-publish-presplit-publish, muse-publish-no-split-function)
+	(muse-journal-split-by-entry, muse-journal-split-by-month): Use
+	muse-insert-file-contents.
+
+	* lisp/muse-book.el (muse-book-publish-chapter)
+	(muse-book-get-directives): Use muse-insert-file-contents.
+
+	* lisp/muse-http.el (muse-http-render-page): Use
+	muse-insert-file-contents.
+
+	* lisp/muse-poem.el (muse-poem-markup-tag): Use
+	muse-insert-file-contents.
+
+	* lisp/muse-publish.el (muse-insert-file-or-string)
+	(muse-publish-file, muse-publish-include-tag)
+	(muse-published-contents): Use muse-insert-file-contents.
+
+	* lisp/muse.el (muse-insert-file-contents): New function that
+	inserts a file with character code conversion, but none of the
+	other frivolities.  Since insert-file-contents-literally does not
+	do character code conversion, it is not suitable for us.
+	(muse-with-temp-buffer): Mention muse-insert-file-contents rather
+	than insert-file-contents-literally.
+
 2007-08-09  Michael Olson  &lt;mwolson@gnu.org&gt;
 
 	* lisp/muse.el (muse-write-file): Pay attention to</diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -153,7 +153,7 @@ content.&quot;)
 
 (defun httpd-send-file (filename)
   (with-temp-buffer
-    (insert-file-contents-literally filename)
+    (insert-file-contents filename)
     (httpd-send-data (buffer-string))))
 
 (defun httpd-lose (code msg)</diff>
      <filename>contrib/httpd.el</filename>
    </modified>
    <modified>
      <diff>@@ -205,7 +205,7 @@ If FILE is not specified, use the published version of the current file.&quot;
                                    (cddr (muse-project-of-file))))))))
   (save-match-data
     (muse-with-temp-buffer
-      (insert-file-contents-literally file)
+      (muse-insert-file-contents file)
       ;; surround first line in &lt;h3&gt;&lt;/h3&gt;
       (goto-char (point-min))
       (insert &quot;&lt;h3&gt;&quot;)</diff>
      <filename>examples/mwolson/muse-init.el</filename>
    </modified>
    <modified>
      <diff>@@ -105,7 +105,7 @@ the file is published no matter what.&quot;
         (muse-publish-presplit-publish file)
         ;; start a temp buffer for main data
         (muse-with-temp-buffer
-          (insert-file-contents-literally file)
+          (muse-insert-file-contents file)
           (let ((mainbuffer (current-buffer))
                 (subcontents))
             (mapc
@@ -130,7 +130,7 @@ the file is published no matter what.&quot;
 
 (defun muse-publish-presplit-publish(file)
   (muse-with-temp-buffer
-    (insert-file-contents-literally file)
+    (muse-insert-file-contents file)
     (let ((muse-publish-markup-regexps muse-publish-presplit-markup-regexps)
           (muse-publish-markup-functions muse-publish-presplit-functions)
           (muse-publishing-styles)
@@ -203,7 +203,7 @@ Changing this will cause bad things to happen. &quot;)
 
 (defun muse-publish-no-split-function (file)
   (muse-with-temp-buffer
-    (insert-file-contents-literally file)
+    (muse-insert-file-contents file)
     (list `(,(file-name-sans-extension file) . (1 ,(point-max))))))
 
 (defun muse-publish-split-file (file)
@@ -342,7 +342,7 @@ the anchor will be output&quot;
 (defun muse-journal-split-by-entry (file)
   &quot;Split a muse journal file into days&quot;
   (muse-with-temp-buffer
-    (insert-file-contents-literally file)
+    (muse-insert-file-contents file)
     (let* ((split-alist)
            (root-name (file-name-sans-extension file))
            (split-regexp &quot;^\\* \\([0-9]\\{8\\}\\)&quot;)
@@ -383,7 +383,7 @@ the anchor will be output&quot;
 This function makes the assumption that the entries are sorted. If
 it isn't then it some of the entries will appear not to be published.&quot;
   (muse-with-temp-buffer
-    (insert-file-contents-literally file)
+    (muse-insert-file-contents file)
     (let* ((split-alist)
            (root-name (file-name-sans-extension file))
            (split-regexp (concat &quot;^\\* \\([0-9]\\{4\\}\\)\\([0-9]\\{2\\}\\)&quot;</diff>
      <filename>experimental/muse-split.el</filename>
    </modified>
    <modified>
      <diff>@@ -90,7 +90,7 @@ but treating the page as if it were a single chapter within a book.&quot;
   (let ((muse-publishing-directives (list (cons &quot;title&quot; title)))
         (muse-publishing-current-file (cdr entry))
         (beg (point)) end)
-    (insert-file-contents-literally (cdr entry))
+    (muse-insert-file-contents (cdr entry))
     (setq end (copy-marker (point-max) t))
     (muse-publish-markup-region beg end (car entry) style)
     (goto-char beg)
@@ -136,7 +136,7 @@ used for publishing.&quot;
     (narrow-to-region (point) (point))
     (unwind-protect
         (progn
-          (insert-file-contents-literally file)
+          (muse-insert-file-contents file)
           (muse-publish-markup
            &quot;attributes&quot;
            `(;; Remove leading and trailing whitespace from the file</diff>
      <filename>lisp/muse-book.el</filename>
    </modified>
    <modified>
      <diff>@@ -153,7 +153,7 @@ cached in memory to speed up serving time.&quot;
             (setq muse-buffer-mtime modified-time))
           (goto-char (point-max))
           (when (bobp)
-            (insert-file-contents-literally file t)
+            (muse-insert-file-contents file t)
             (let ((styles (cddr (muse-project muse-http-serving-p)))
                   style)
               (while (and styles (null style))</diff>
      <filename>lisp/muse-http.el</filename>
    </modified>
    <modified>
      <diff>@@ -205,7 +205,7 @@ The form of usage is:
       (setq beg (point))
       (insert
        (muse-with-temp-buffer
-         (insert-file-contents-literally page)
+         (muse-insert-file-contents page)
          (goto-char (point-min))
          (if (assoc &quot;nohead&quot; attrs)
              (progn</diff>
      <filename>lisp/muse-poem.el</filename>
    </modified>
    <modified>
      <diff>@@ -546,7 +546,7 @@ to the text with ARGS as parameters.&quot;
              (not (string-match &quot;\n&quot; file-or-string))
              (file-readable-p file-or-string))
         (setq end (+ beg
-                     (cadr (insert-file-contents-literally file-or-string))))
+                     (cadr (muse-insert-file-contents file-or-string))))
       (insert file-or-string)
       (setq end (point)))
     (save-restriction
@@ -784,7 +784,7 @@ the file is published no matter what.&quot;
                     muse-publish-report-threshhold))
             (message &quot;Publishing %s ...&quot; file))
         (muse-with-temp-buffer
-          (insert-file-contents-literally file)
+          (muse-insert-file-contents file)
           (muse-publish-markup-buffer (muse-page-name file) style)
           (when (muse-write-file output-path)
             (muse-style-run-hooks :final style file output-path target)))
@@ -1989,7 +1989,7 @@ explanation of how it works.&quot;
                         (file-name-directory muse-publishing-current-file)))
       (error &quot;No file attribute specified in &lt;include&gt; tag&quot;))
     (muse-publish-markup-attribute beg end attrs t
-      (insert-file-contents-literally filename))))
+      (muse-insert-file-contents filename))))
 
 (defun muse-publish-mark-up-tag (beg end attrs)
   &quot;Run an Emacs Lisp function on the region delimted by this tag.
@@ -2064,7 +2064,7 @@ The text is removed regardless of whether and part of it is uppercase.&quot;
 (defun muse-published-contents (file)
   (when (file-readable-p file)
     (muse-with-temp-buffer
-      (insert-file-contents-literally file)
+      (muse-insert-file-contents file)
       (muse-published-buffer-contents (current-buffer)))))
 
 (defun muse-publish-transform-output</diff>
      <filename>lisp/muse-publish.el</filename>
    </modified>
    <modified>
      <diff>@@ -258,7 +258,7 @@ See also `with-temp-file' and `with-output-to-string'.
 
 Unlike `with-temp-buffer', this will never attempt to save the
 temp buffer.  It is meant to be used along with
-`insert-file-contents' or `insert-file-contents-literally'.
+`insert-file-contents' or `muse-insert-file-contents'.
 
 Additionally, if `debug-on-error' is set to t, keep the buffer
 around for debugging purposes rather than removing it.&quot;
@@ -291,6 +291,33 @@ around for debugging purposes rather than removing it.&quot;
 (put 'muse-with-temp-buffer 'lisp-indent-function 0)
 (put 'muse-with-temp-buffer 'edebug-form-spec '(body))
 
+(defun muse-insert-file-contents (filename &amp;optional visit)
+  &quot;Insert the contents of file FILENAME after point.
+Do character code conversion, but none of the other unnecessary
+things like format decoding or `find-file-hook'.
+
+If VISIT is non-nil, the buffer's visited filename
+and last save file modtime are set, and it is marked unmodified.
+If visiting and the file does not exist, visiting is completed
+before the error is signaled.&quot;
+  (let ((format-alist nil)
+        (after-insert-file-functions nil)
+        (find-buffer-file-type-function
+         (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))
+      (if find-buffer-file-type-function
+          (fset 'find-buffer-file-type find-buffer-file-type-function)
+        (fmakunbound 'find-buffer-file-type)))))
+
 (defun muse-write-file (filename)
   &quot;Write current buffer into file FILENAME.
 Unlike `write-file', this does not visit the file, try to back it</diff>
      <filename>lisp/muse.el</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f18db734f469f30b671367d1a020ba8d15390672</id>
    </parent>
  </parents>
  <author>
    <name>Michael W. Olson</name>
    <email>mwolson@gnu.org</email>
  </author>
  <url>http://github.com/alexott/muse/commit/796fba2c8a97aae674dbb4955aa4afda4c3ff41a</url>
  <id>796fba2c8a97aae674dbb4955aa4afda4c3ff41a</id>
  <committed-date>2007-08-10T17:43:48-07:00</committed-date>
  <authored-date>2007-08-10T17:43:48-07:00</authored-date>
  <message>Use muse-insert-file-contents rather than insert-file-contents-literally

2007-08-10  Michael Olson  &lt;mwolson@gnu.org&gt;

	* contrib/httpd.el (httpd-send-file): Use insert-file-contents.

	* examples/mwolson/muse-init.el (my-muse-prepare-entry-for-xanga):
	Use muse-insert-file-contents.

	* experimental/muse-split.el (muse-publish-file)
	(muse-publish-presplit-publish, muse-publish-no-split-function)
	(muse-journal-split-by-entry, muse-journal-split-by-month): Use
	muse-insert-file-contents.

	* lisp/muse-book.el (muse-book-publish-chapter)
	(muse-book-get-directives): Use muse-insert-file-contents.

	* lisp/muse-http.el (muse-http-render-page): Use
	muse-insert-file-contents.

	* lisp/muse-poem.el (muse-poem-markup-tag): Use
	muse-insert-file-contents.

	* lisp/muse-publish.el (muse-insert-file-or-string)
	(muse-publish-file, muse-publish-include-tag)
	(muse-published-contents): Use muse-insert-file-contents.

	* lisp/muse.el (muse-insert-file-contents): New function that
	inserts a file with character code conversion, but none of the
	other frivolities.  Since insert-file-contents-literally does not
	do character code conversion, it is not suitable for us.
	(muse-with-temp-buffer): Mention muse-insert-file-contents rather
	than insert-file-contents-literally.</message>
  <tree>79a747245b7d778132470cc8370d813220109fb6</tree>
  <committer>
    <name>Michael W. Olson</name>
    <email>mwolson@gnu.org</email>
  </committer>
</commit>
