Mercurial > emacs
diff src/undo.c @ 67339:7a9d49053af3
(truncate_undo_list): Avoid dangerous side effects in NILP argument.
| author | Ken Raeburn <raeburn@raeburn.org> |
|---|---|
| date | Tue, 06 Dec 2005 07:40:14 +0000 |
| parents | a0d1312ede66 |
| children | 11268b0660c8 |
line wrap: on
line diff
--- a/src/undo.c Tue Dec 06 07:39:57 2005 +0000 +++ b/src/undo.c Tue Dec 06 07:40:14 2005 +0000 @@ -378,11 +378,11 @@ && size_so_far > XINT (Vundo_outer_limit) && !NILP (Vundo_outer_limit_function)) { - Lisp_Object temp = last_undo_buffer; + Lisp_Object temp = last_undo_buffer, tem; /* Normally the function this calls is undo-outer-limit-truncate. */ - if (! NILP (call1 (Vundo_outer_limit_function, - make_number (size_so_far)))) + tem = call1 (Vundo_outer_limit_function, make_number (size_so_far)); + if (! NILP (tem)) { /* The function is responsible for making any desired changes in buffer-undo-list. */
