diff options
author | Chong Yidong <cyd@gnu.org> | 2012-09-22 11:07:39 +0800 |
---|---|---|
committer | Chong Yidong <cyd@gnu.org> | 2012-09-22 11:07:39 +0800 |
commit | 82f8cd940f097af95cb1100f7f38a1f08778cb1d (patch) | |
tree | 90ff8801ad556cb716f6a200d2ef863ab7fbaf77 /src/buffer.c | |
parent | fa42927fd0ed023ec95a5475ce342429fd8a348d (diff) | |
download | emacs-82f8cd940f097af95cb1100f7f38a1f08778cb1d.tar.gz |
Fix auto-save and locking for indirect buffers.
* lisp/simple.el (undo): Handle indirect buffers.
* buffer.c (Fset_buffer_modified_p): Handle indirect buffers.
Fixes: debbugs:8207
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 8 |
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. */) /* If buffer becoming modified, lock the file. If buffer becoming unmodified, unlock the file. */ - fn = BVAR (current_buffer, file_truename); + struct buffer *b = current_buffer->base_buffer + ? current_buffer->base_buffer + : current_buffer; + + fn = BVAR (b, file_truename); /* Test buffer-file-name so that binding it to nil is effective. */ - if (!NILP (fn) && ! NILP (BVAR (current_buffer, filename))) + if (!NILP (fn) && ! NILP (BVAR (b, filename))) { bool already = SAVE_MODIFF < MODIFF; if (!already && !NILP (flag)) |