From b347b3fd3fbbdd5f009294edd406696889f34329 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 8 Aug 2000 14:45:00 +0000 Subject: [PATCH] (record_delete): Make sure last_point_position_buffer is a buffer before comparing pointers. --- src/ChangeLog | 26 ++++++++++++++++++++++++++ src/undo.c | 2 ++ 2 files changed, 28 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index b1a2b6aca82..3a749f95627 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,31 @@ 2000-08-08 Ken Raeburn + * keyboard.c (syms_of_keyboard): Initialize + last_point_position_buffer. + * undo.c (record_delete): Make sure last_point_position_buffer is + a buffer before comparing pointers. + + * coding.h (decode_coding_string): Declare. + + * intervals.h (Fprevious_single_char_property_change): Declare. + + * textprop.c (Fprevious_single_char_property_change): Don't do + arithmetic directly on lisp objects. + + * editfns.c (find_field): Use EQ, not ==, to compare lisp + objects. + + * keyboard.h (menu_item_eval_property): Declare. + + * xdisp.c (message_dolog): Save and protect string "*Messages*" to + reuse as buffer name, instead of recreating (and discarding) every + time a message is logged. + (with_echo_area_buffer): Make callback arg A2 a lisp object. + (current_message_1, truncate_message_1, set_message_1, + display_echo_area_1, resize_mini_window_1): Signatures changed. + (current_message, truncate_echo_area, display_echo_area, + resize_echo_area_axactly): Changed calls. + * coding.c (find_safe_codings): CHAR_TABLE_SET index must be a lisp object. (Ffind_coding_systems_region_internal): First argument to Fappend diff --git a/src/undo.c b/src/undo.c index c09da9cddb5..49dc4453d11 100644 --- a/src/undo.c +++ b/src/undo.c @@ -140,6 +140,8 @@ record_delete (beg, string) point wasn't at start of deleted range, record where it was. */ if (at_boundary && last_point_position != XFASTINT (sbeg) + /* If we're called from batch mode, this could be nil. */ + && BUFFERP (last_point_position_buffer) && current_buffer == XBUFFER (last_point_position_buffer)) current_buffer->undo_list = Fcons (make_number (last_point_position), current_buffer->undo_list); -- 2.39.2