From 90d456d2972a4b77637eeba4cce4f2697efb3a32 Mon Sep 17 00:00:00 2001 From: Karl Heuer Date: Fri, 26 Mar 1999 17:55:42 +0000 Subject: [PATCH] (Fset_buffer_modified_p): Don't lock or unlock if buffer-file-name is nil. --- src/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.") If buffer becoming unmodified, unlock the file. */ fn = current_buffer->file_truename; - if (!NILP (fn)) + /* Test buffer-file-name so that binding it to nil is effective. */ + if (!NILP (fn) && ! NILP (current_buffer->filename)) { already = SAVE_MODIFF < MODIFF; if (!already && !NILP (flag)) -- 2.39.2