Richard Stallman <[EMAIL PROTECTED]> writes: > I think I have fixed this; does this give good results? > > [...] > > + /* Now we have read all the file data into the gap. > + If it was empty, undo marking the buffer modified. */ > + > + if (inserted == 0) > + { > + if (we_locked_file) > + unlock_file (current_buffer->file_truename); > + Vdeactivate_mark = old_Vdeactivate_mark; > + } > + > /* Make the text read part of the buffer. */
I will try it shortly. I have one concern though---does this code take care of the situation when the buffer was modified even before insert-file-contents is called? I do not understand the details of the code, but I am worried that if you read in 0 bytes into an already-modified buffer, you might remove a lock that was there initially for reasons unrelated to the insert-file-contents. I wonder if one should use the functionality equivalent to file-locked-p to test for this. Perhaps you are already doing it, as I do not understand the "#ifdef CLASH_DETECTION" surrounded code. --Boris _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel