aboutsummaryrefslogtreecommitdiffstats
path: root/src/undo.c
diff options
context:
space:
mode:
authorKaroly Lorentey2005-12-29 04:46:59 +0000
committerKaroly Lorentey2005-12-29 04:46:59 +0000
commit01999e9d53e4e8d12314b16ce7d0e3d7785bfbe3 (patch)
tree53c6b956f0daa867484d1fb1d259dc4b37266bb7 /src/undo.c
parente583523a108624f7fd0c28294010b19daae5ab97 (diff)
parentd0b9c14d9fa4f77c952300c50ab35eddf3f45980 (diff)
downloademacs-01999e9d53e4e8d12314b16ce7d0e3d7785bfbe3.tar.gz
emacs-01999e9d53e4e8d12314b16ce7d0e3d7785bfbe3.zip
Merged from miles@gnu.org--gnu-2005 (patch 681)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-681 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-469
Diffstat (limited to 'src/undo.c')
-rw-r--r--src/undo.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/undo.c b/src/undo.c
index ecbb714fddd..bf774affac5 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -24,6 +24,7 @@ Boston, MA 02110-1301, USA. */
24#include "lisp.h" 24#include "lisp.h"
25#include "buffer.h" 25#include "buffer.h"
26#include "commands.h" 26#include "commands.h"
27#include "window.h"
27 28
28/* Limits controlling how much undo information to keep. */ 29/* Limits controlling how much undo information to keep. */
29 30
@@ -100,12 +101,19 @@ record_point (pt)
100 /* If we are just after an undo boundary, and 101 /* If we are just after an undo boundary, and
101 point wasn't at start of deleted range, record where it was. */ 102 point wasn't at start of deleted range, record where it was. */
102 if (at_boundary 103 if (at_boundary
103 && last_point_position != pt
104 /* If we're called from batch mode, this could be nil. */
105 && BUFFERP (last_point_position_buffer) 104 && BUFFERP (last_point_position_buffer)
105 /* If we're called from batch mode, this could be nil. */
106 && current_buffer == XBUFFER (last_point_position_buffer)) 106 && current_buffer == XBUFFER (last_point_position_buffer))
107 current_buffer->undo_list 107 {
108 = Fcons (make_number (last_point_position), current_buffer->undo_list); 108 /* If we have switched windows, use the point value
109 from the window we are in. */
110 if (! EQ (last_point_position_window, selected_window))
111 last_point_position = marker_position (XWINDOW (selected_window)->pointm);
112
113 if (last_point_position != pt)
114 current_buffer->undo_list
115 = Fcons (make_number (last_point_position), current_buffer->undo_list);
116 }
109} 117}
110 118
111/* Record an insertion that just happened or is about to happen, 119/* Record an insertion that just happened or is about to happen,