HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ca0f64
)
(Fprimitive_undo): Check that undo function does not switch buffer.
author
Kim F. Storm
<storm@cua.dk>
Wed, 9 Feb 2005 21:49:12 +0000
(21:49 +0000)
committer
Kim F. Storm
<storm@cua.dk>
Wed, 9 Feb 2005 21:49:12 +0000
(21:49 +0000)
src/undo.c
patch
|
blob
|
blame
|
history
diff --git
a/src/undo.c
b/src/undo.c
index
86237e2
..
b4e16bf
100644
(file)
--- a/
src/undo.c
+++ b/
src/undo.c
@@
-557,6
+557,8
@@
Return what remains of the list. */)
else if (EQ (car, Qapply))
{
/* Element (apply FUN . ARGS) means call FUN to undo. */
+ struct buffer *save_buffer = current_buffer;
+
car = Fcar (cdr);
cdr = Fcdr (cdr);
if (INTEGERP (car))
@@
-582,6
+584,9
@@
Return what remains of the list. */)
}
else
apply1 (car, cdr);
+
+ if (save_buffer != current_buffer)
+ error ("Undo function switched buffer");
did_apply = 1;
}
else if (STRINGP (car) && INTEGERP (cdr))