diff options
| author | Chong Yidong | 2012-09-22 11:07:39 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-09-22 11:07:39 +0800 |
| commit | 82f8cd940f097af95cb1100f7f38a1f08778cb1d (patch) | |
| tree | 90ff8801ad556cb716f6a200d2ef863ab7fbaf77 /src/buffer.c | |
| parent | fa42927fd0ed023ec95a5475ce342429fd8a348d (diff) | |
| download | emacs-82f8cd940f097af95cb1100f7f38a1f08778cb1d.tar.gz emacs-82f8cd940f097af95cb1100f7f38a1f08778cb1d.zip | |
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. */) | |||
| 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)) |