From: Po Lu Date: Thu, 28 Jul 2022 11:25:46 +0000 (+0800) Subject: Correctly set marker position after specpdl is unwound during printing X-Git-Tag: emacs-29.0.90~1447^2~700 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=163424e04b7f75a1655fd263ba4b6d6d4fa880b2;p=emacs.git Correctly set marker position after specpdl is unwound during printing * src/print.c (PRINTFINISH): Don't call set_marker_both with the wrong current_buffer. Reported by Lars Ingebrigtsen . --- diff --git a/src/print.c b/src/print.c index 5ad4d4fbb58..7bb905b2699 100644 --- a/src/print.c +++ b/src/print.c @@ -180,14 +180,14 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1; print_buffer_pos_byte, 0, 1, 0); \ signal_after_change (PT - print_buffer_pos, 0, print_buffer_pos);\ } \ - unbind_to (specpdl_count, Qnil); \ if (MARKERP (original)) \ set_marker_both (original, Qnil, PT, PT_BYTE); \ if (old_point >= 0) \ SET_PT_BOTH (old_point + (old_point >= start_point \ ? PT - start_point : 0), \ old_point_byte + (old_point_byte >= start_point_byte \ - ? PT_BYTE - start_point_byte : 0)); + ? PT_BYTE - start_point_byte : 0)); \ + unbind_to (specpdl_count, Qnil); \ /* This is used to free the print buffer; we don't simply record xfree since print_buffer can be reallocated during the printing. */