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)
(cherry picked from commit a5867ddfbd
)
This commit is contained in:
parent
19da602991
commit
e2c7b6372d
1 changed files with 7 additions and 0 deletions
|
@ -2145,6 +2145,13 @@ nil. */)
|
||||||
{
|
{
|
||||||
signal_after_change (BEGV, size_a, ZV - BEGV);
|
signal_after_change (BEGV, size_a, ZV - BEGV);
|
||||||
update_compositions (BEGV, ZV, CHECK_INSIDE);
|
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. */
|
||||||
|
if (SAVE_MODIFF == MODIFF
|
||||||
|
&& STRINGP (BVAR (a, file_truename)))
|
||||||
|
unlock_file (BVAR (a, file_truename));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Qt;
|
return Qt;
|
||||||
|
|
Loading…
Add table
Reference in a new issue