aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c
index b020edb9962..22624e33a4b 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1341,9 +1341,13 @@ A non-nil FLAG means mark the buffer modified. */)
1341 /* If buffer becoming modified, lock the file. 1341 /* If buffer becoming modified, lock the file.
1342 If buffer becoming unmodified, unlock the file. */ 1342 If buffer becoming unmodified, unlock the file. */
1343 1343
1344 fn = BVAR (current_buffer, file_truename); 1344 struct buffer *b = current_buffer->base_buffer
1345 ? current_buffer->base_buffer
1346 : current_buffer;
1347
1348 fn = BVAR (b, file_truename);
1345 /* Test buffer-file-name so that binding it to nil is effective. */ 1349 /* Test buffer-file-name so that binding it to nil is effective. */
1346 if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename))) 1350 if (!NILP (fn) && ! NILP (BVAR (b, filename)))
1347 { 1351 {
1348 bool already = SAVE_MODIFF < MODIFF; 1352 bool already = SAVE_MODIFF < MODIFF;
1349 if (!already && !NILP (flag)) 1353 if (!already && !NILP (flag))