SL Baur <steve(a)xemacs.org> writes:
`insert-file-contents' is a compiled Lisp function
-- loaded from "/usr/local/devel/miho-21.1-optimized/lisp/code-files.elc"
(insert-file-contents FILENAME &optional VISIT BEG END REPLACE)
...
NOTE: When Mule support is enabled, the REPLACE argument is
currently ignored.
...
REPLACE is hosed because insert-file-contents, for reasons unknown,
narrows the buffer between (point) and (point) just before calling
insert-file-contents-internal. OTOH, the relevant code in
Finsert_file_contents_internal() looks like this:
if (!NILP (replace))
{
buffer_delete_range (buf, BUF_BEG (buf), BUF_Z (buf),
!NILP (visit) ? INSDEL_NO_LOCKING : 0);
}
Obviously, if the buffer is narrowed to zero characters' length, the
above code is no-op. If you call the -internal function directly,
you'll see that it works 100% right under Mule.
The person who introduced the narrowing should explain its purpose. I
cannot and I think it should be removed, pronto.
Oh, and insert-file-contents also "documents" REPLACE not to work with
Mule, but I don't see any reason why it shouldn't. The only thing
that really doesn't work with Mule is the FSFMACS_SPEEDY_INSERT stuff,
but that's only an internal optimization.
--
Sam, is "pronto" a real word?
Ceterum censeo Mule esse delendam! --me, after reading the code for
insert-file-contents.