aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/buffer.c b/src/buffer.c
index e2aa5818ff1..1089872ebe7 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -807,7 +807,8 @@ A non-nil FLAG means mark the buffer modified.")
807 If buffer becoming unmodified, unlock the file. */ 807 If buffer becoming unmodified, unlock the file. */
808 808
809 fn = current_buffer->file_truename; 809 fn = current_buffer->file_truename;
810 if (!NILP (fn)) 810 /* Test buffer-file-name so that binding it to nil is effective. */
811 if (!NILP (fn) && ! NILP (current_buffer->filename))
811 { 812 {
812 already = SAVE_MODIFF < MODIFF; 813 already = SAVE_MODIFF < MODIFF;
813 if (!already && !NILP (flag)) 814 if (!already && !NILP (flag))