diff options
| author | Gergely Risko | 2012-08-14 13:09:35 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-08-14 13:09:35 +0800 |
| commit | f48b82fd19703c5001c9cceb14b4d8372ce2b083 (patch) | |
| tree | 44290c75107ec15e6c4bfbef0be67246899e9158 /src | |
| parent | fd318b54074f824376e7766cf127b6a4624f191a (diff) | |
| download | emacs-f48b82fd19703c5001c9cceb14b4d8372ce2b083.tar.gz emacs-f48b82fd19703c5001c9cceb14b4d8372ce2b083.zip | |
Fix for undo recording in decode_coding.
* coding.c (decode_coding): Record buffer modification before
disabling undo_list.
Fixes: debbugs:11773
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/coding.c | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9cd76d2fc5f..e622d95bff8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-08-14 Gergely Risko <gergely@risko.hu> | ||
| 2 | |||
| 3 | * coding.c (decode_coding): Record buffer modification before | ||
| 4 | disabling undo_list (Bug#11773). | ||
| 5 | |||
| 1 | 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru> | 6 | 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 7 | ||
| 3 | Revert and cleanup some recent overlay changes. | 8 | Revert and cleanup some recent overlay changes. |
diff --git a/src/coding.c b/src/coding.c index 08633d8bcff..c601a18b26e 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -7102,6 +7102,15 @@ decode_coding (struct coding_system *coding) | |||
| 7102 | set_buffer_internal (XBUFFER (coding->dst_object)); | 7102 | set_buffer_internal (XBUFFER (coding->dst_object)); |
| 7103 | if (GPT != PT) | 7103 | if (GPT != PT) |
| 7104 | move_gap_both (PT, PT_BYTE); | 7104 | move_gap_both (PT, PT_BYTE); |
| 7105 | |||
| 7106 | /* We must disable undo_list in order to record the whole insert | ||
| 7107 | transaction via record_insert at the end. But doing so also | ||
| 7108 | disables the recording of the first change to the undo_list. | ||
| 7109 | Therefore we check for first change here and record it via | ||
| 7110 | record_first_change if needed. */ | ||
| 7111 | if (MODIFF <= SAVE_MODIFF) | ||
| 7112 | record_first_change (); | ||
| 7113 | |||
| 7105 | undo_list = BVAR (current_buffer, undo_list); | 7114 | undo_list = BVAR (current_buffer, undo_list); |
| 7106 | BSET (current_buffer, undo_list, Qt); | 7115 | BSET (current_buffer, undo_list, Qt); |
| 7107 | } | 7116 | } |