mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
(Fprimitive_undo): Check that undo function does not switch buffer.
This commit is contained in:
parent
9ca0f64a8a
commit
a7a39468d6
1 changed files with 5 additions and 0 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue