projects
/
chise
/
xemacs-chise.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Apply new glyph-image conventions for `ucs@*', `adobe-japan1-*',
[chise/xemacs-chise.git-]
/
src
/
undo.c
diff --git
a/src/undo.c
b/src/undo.c
index
6c12abf
..
f8d844e
100644
(file)
--- a/
src/undo.c
+++ b/
src/undo.c
@@
-46,7
+46,7
@@
Lisp_Object Qinhibit_read_only;
which will be added to the list at the end of the command.
This ensures we can't run out of space while trying to make
an undo-boundary. */
which will be added to the list at the end of the command.
This ensures we can't run out of space while trying to make
an undo-boundary. */
-Lisp_Object pending_boundary;
+static Lisp_Object pending_boundary;
static void
undo_boundary (struct buffer *b)
static void
undo_boundary (struct buffer *b)
@@
-75,7
+75,9
@@
undo_prelude (struct buffer *b, int hack_pending_boundary)
if (EQ (b->undo_list, Qt))
return (0);
if (EQ (b->undo_list, Qt))
return (0);
- if (NILP (last_undo_buffer) || b != XBUFFER (last_undo_buffer))
+ if (NILP (last_undo_buffer)
+ || (BUFFER_BASE_BUFFER (b)
+ != BUFFER_BASE_BUFFER (XBUFFER (last_undo_buffer))))
{
undo_boundary (b);
XSETBUFFER (last_undo_buffer, b);
{
undo_boundary (b);
XSETBUFFER (last_undo_buffer, b);
@@
-279,7
+281,7
@@
truncate_undo_list (Lisp_Object list, int minsize, int maxsize)
&& NILP (XCAR (next)))
{
/* Add in the space occupied by this element and its chain link. */
&& NILP (XCAR (next)))
{
/* Add in the space occupied by this element and its chain link. */
- size_so_far += sizeof (struct Lisp_Cons);
+ size_so_far += sizeof (Lisp_Cons);
/* Advance to next element. */
prev = next;
/* Advance to next element. */
prev = next;
@@
-292,12
+294,12
@@
truncate_undo_list (Lisp_Object list, int minsize, int maxsize)
elt = XCAR (next);
/* Add in the space occupied by this element and its chain link. */
elt = XCAR (next);
/* Add in the space occupied by this element and its chain link. */
- size_so_far += sizeof (struct Lisp_Cons);
+ size_so_far += sizeof (Lisp_Cons);
if (CONSP (elt))
{
if (CONSP (elt))
{
- size_so_far += sizeof (struct Lisp_Cons);
+ size_so_far += sizeof (Lisp_Cons);
if (STRINGP (XCAR (elt)))
if (STRINGP (XCAR (elt)))
- size_so_far += (sizeof (struct Lisp_String) - 1
+ size_so_far += (sizeof (Lisp_String) - 1
+ XSTRING_LENGTH (XCAR (elt)));
}
+ XSTRING_LENGTH (XCAR (elt)));
}
@@
-327,12
+329,12
@@
truncate_undo_list (Lisp_Object list, int minsize, int maxsize)
}
/* Add in the space occupied by this element and its chain link. */
}
/* Add in the space occupied by this element and its chain link. */
- size_so_far += sizeof (struct Lisp_Cons);
+ size_so_far += sizeof (Lisp_Cons);
if (CONSP (elt))
{
if (CONSP (elt))
{
- size_so_far += sizeof (struct Lisp_Cons);
+ size_so_far += sizeof (Lisp_Cons);
if (STRINGP (XCAR (elt)))
if (STRINGP (XCAR (elt)))
- size_so_far += (sizeof (struct Lisp_String) - 1
+ size_so_far += (sizeof (Lisp_String) - 1
+ XSTRING_LENGTH (XCAR (elt)));
}
+ XSTRING_LENGTH (XCAR (elt)));
}
@@
-545,9
+547,16
@@
syms_of_undo (void)
}
void
}
void
-vars_of_undo (void)
+reinit_vars_of_undo (void)
{
inside_undo = 0;
{
inside_undo = 0;
+}
+
+void
+vars_of_undo (void)
+{
+ reinit_vars_of_undo ();
+
pending_boundary = Qnil;
staticpro (&pending_boundary);
last_undo_buffer = Qnil;
pending_boundary = Qnil;
staticpro (&pending_boundary);
last_undo_buffer = Qnil;