]> git.eshelyaron.com Git - emacs.git/commit
Avoid extra output in Vprin1_to_string_buffer (bug#78842)
authorPip Cet <pipcet@protonmail.com>
Sat, 28 Jun 2025 09:33:01 +0000 (09:33 +0000)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 20:07:54 +0000 (22:07 +0200)
commit793ae50016ccdf11ce3a059339a0ee2208a04f62
tree31170048efcdc5e1d5d233f11df1693985e50fdc
parent815c59dacdd6c71efcf23c824d263f8636a8c90b
Avoid extra output in Vprin1_to_string_buffer (bug#78842)

print_error_message can throw after producing some output, so use
unwind-protect to ensure prin1-to-string-buffer is cleared.

* src/print.c (erase_prin1_to_string_buffer): New.
(Ferror_message_string): Use it to catch errors thrown in
'print_error_message'.
* test/src/print-tests.el (error-message-string-circular): Expand
test.

(cherry picked from commit 6b19eb53c5048cfec1f3601afb44f94ebbb9d138)
src/print.c
test/src/print-tests.el