* src/buffer.c (Frestore_buffer_modified_p): Fix bug#29846
Don't mess with the lock file when inhibit_modification_hooks is set, just like we do in prepare_to_modify_buffer_1.
This commit is contained in:
parent
81b1028b63
commit
e879a5444a
1 changed files with 11 additions and 9 deletions
|
@ -1354,7 +1354,6 @@ It is not ensured that mode lines will be updated to show the modified
|
||||||
state of the current buffer. Use with care. */)
|
state of the current buffer. Use with care. */)
|
||||||
(Lisp_Object flag)
|
(Lisp_Object flag)
|
||||||
{
|
{
|
||||||
Lisp_Object fn;
|
|
||||||
|
|
||||||
/* If buffer becoming modified, lock the file.
|
/* If buffer becoming modified, lock the file.
|
||||||
If buffer becoming unmodified, unlock the file. */
|
If buffer becoming unmodified, unlock the file. */
|
||||||
|
@ -1363,7 +1362,9 @@ state of the current buffer. Use with care. */)
|
||||||
? current_buffer->base_buffer
|
? current_buffer->base_buffer
|
||||||
: current_buffer;
|
: current_buffer;
|
||||||
|
|
||||||
fn = BVAR (b, file_truename);
|
if (!inhibit_modification_hooks)
|
||||||
|
{
|
||||||
|
Lisp_Object fn = BVAR (b, file_truename);
|
||||||
/* Test buffer-file-name so that binding it to nil is effective. */
|
/* Test buffer-file-name so that binding it to nil is effective. */
|
||||||
if (!NILP (fn) && ! NILP (BVAR (b, filename)))
|
if (!NILP (fn) && ! NILP (BVAR (b, filename)))
|
||||||
{
|
{
|
||||||
|
@ -1373,6 +1374,7 @@ state of the current buffer. Use with care. */)
|
||||||
else if (already && NILP (flag))
|
else if (already && NILP (flag))
|
||||||
unlock_file (fn);
|
unlock_file (fn);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Here we have a problem. SAVE_MODIFF is used here to encode
|
/* Here we have a problem. SAVE_MODIFF is used here to encode
|
||||||
buffer-modified-p (as SAVE_MODIFF<MODIFF) as well as
|
buffer-modified-p (as SAVE_MODIFF<MODIFF) as well as
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue