Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
213861c7
Commit
213861c7
authored
Oct 31, 1992
by
Jim Blandy
Browse files
* undo.c (record_insert): Use accessors on BEG and LENGTH.
(truncate_undo_list): Use NILP, not == Qnil.
parent
d084e942
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
src/undo.c
src/undo.c
+8
-7
No files found.
src/undo.c
View file @
213861c7
...
...
@@ -54,16 +54,17 @@ record_insert (beg, length)
if
(
XTYPE
(
elt
)
==
Lisp_Cons
&&
XTYPE
(
XCONS
(
elt
)
->
car
)
==
Lisp_Int
&&
XTYPE
(
XCONS
(
elt
)
->
cdr
)
==
Lisp_Int
&&
XINT
(
XCONS
(
elt
)
->
cdr
)
==
beg
)
&&
XINT
(
XCONS
(
elt
)
->
cdr
)
==
XINT
(
beg
)
)
{
XSETINT
(
XCONS
(
elt
)
->
cdr
,
beg
+
length
);
XSETINT
(
XCONS
(
elt
)
->
cdr
,
XINT
(
beg
)
+
XINT
(
length
)
)
;
return
;
}
}
XFASTINT
(
lbeg
)
=
beg
;
XFASTINT
(
lend
)
=
beg
+
length
;
current_buffer
->
undo_list
=
Fcons
(
Fcons
(
lbeg
,
lend
),
current_buffer
->
undo_list
);
lbeg
=
beg
;
XSET
(
lend
,
Lisp_Int
,
XINT
(
beg
)
+
XINT
(
length
));
current_buffer
->
undo_list
=
Fcons
(
Fcons
(
lbeg
,
lend
),
current_buffer
->
undo_list
);
}
/* Record that a deletion is about to take place,
...
...
@@ -163,7 +164,7 @@ truncate_undo_list (list, minsize, maxsize)
Skip, skip, skip the undo, skip to the undo bound'ry.
(Get it? "Skip to my Loo?") */
if
(
XTYPE
(
next
)
==
Lisp_Cons
&&
XCONS
(
next
)
->
car
==
Qnil
)
&&
NILP
(
XCONS
(
next
)
->
car
)
)
{
/* Add in the space occupied by this element and its chain link. */
size_so_far
+=
sizeof
(
struct
Lisp_Cons
);
...
...
@@ -173,7 +174,7 @@ truncate_undo_list (list, minsize, maxsize)
next
=
XCONS
(
next
)
->
cdr
;
}
while
(
XTYPE
(
next
)
==
Lisp_Cons
&&
XCONS
(
next
)
->
car
!=
Qnil
)
&&
!
NILP
(
XCONS
(
next
)
->
car
)
)
{
Lisp_Object
elt
;
elt
=
XCONS
(
next
)
->
car
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment