[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/undo.c,v
From: |
Martin Rudalics |
Subject: |
[Emacs-diffs] Changes to emacs/src/undo.c,v |
Date: |
Sun, 20 Jan 2008 10:33:56 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Martin Rudalics <m061211> 08/01/20 10:33:56
Index: undo.c
===================================================================
RCS file: /sources/emacs/emacs/src/undo.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -b -r1.82 -r1.83
--- undo.c 8 Jan 2008 20:44:15 -0000 1.82
+++ undo.c 20 Jan 2008 10:33:56 -0000 1.83
@@ -53,8 +53,12 @@
an undo-boundary. */
Lisp_Object pending_boundary;
+/* Nonzero means do not record point in record_point. */
+
+int undo_inhibit_record_point;
+
/* Record point as it was at beginning of this command (if necessary)
- And prepare the undo info for recording a change.
+ and prepare the undo info for recording a change.
PT is the position of point that will naturally occur as a result of the
undo record that will be added just after this command terminates. */
@@ -64,6 +68,14 @@
{
int at_boundary;
+ /* Don't record position of pt when undo_inhibit_record_point holds.
+ Needed to avoid inserting a position record in buffer-undo-list
+ when last_point_position has not been set up correctly by
+ command_loop_1, for example, when running a repeat-repeat-char
+ event. */
+ if (undo_inhibit_record_point)
+ return;
+
/* Allocate a cons cell to be the undo boundary after this command. */
if (NILP (pending_boundary))
pending_boundary = Fcons (Qnil, Qnil);
@@ -719,6 +731,10 @@
Garbage collection is inhibited around the call to this function,
so it must make sure not to do a lot of consing. */);
Vundo_outer_limit_function = Qnil;
+
+ DEFVAR_BOOL ("undo-inhibit-record-point", &undo_inhibit_record_point,
+ doc: /* Non-nil means do not record `point' in
`buffer-undo-list'. */);
+ undo_inhibit_record_point = 0;
}
/* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a