Commit a5867ddf authored by Eli Zaretskii's avatar Eli Zaretskii

Don't leave lock files after 'replace-buffer-contents'

* src/editfns.c (Freplace_buffer_contents): Unlock the buffer's
file if no changes have been made.  (Bug#44303)
parent bc76afd3
......@@ -2117,6 +2117,13 @@ nil. */)
signal_after_change (BEGV, size_a, ZV - BEGV);
update_compositions (BEGV, ZV, CHECK_INSIDE);
/* We've locked the buffer's file above in
prepare_to_modify_buffer; if the buffer is unchanged at this
point, i.e. no insertions or deletions have been made, unlock
the file now. */
&& STRINGP (BVAR (a, file_truename)))
unlock_file (BVAR (a, file_truename));
return Qt;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment