Mercurial > emacs
changeset 34479:aab24f62ad6b
(setup_echo_area_for_printing, with_echo_area_buffer):
Bind `inhibit-read-only' to t.
(unwind_with_echo_area_buffer): Use AREF.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 12 Dec 2000 13:31:47 +0000 |
parents | 1b32037b8a8d |
children | 816fa0390935 |
files | src/xdisp.c |
diffstat | 1 files changed, 17 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Tue Dec 12 12:58:16 2000 +0000 +++ b/src/xdisp.c Tue Dec 12 13:31:47 2000 +0000 @@ -5920,6 +5920,7 @@ current_buffer->undo_list = Qt; current_buffer->read_only = Qnil; + specbind (Qinhibit_read_only, Qt); if (clear_buffer_p && Z > BEG) del_range (BEG, Z); @@ -5987,21 +5988,19 @@ unwind_with_echo_area_buffer (vector) Lisp_Object vector; { - int i = 0; - - set_buffer_internal_1 (XBUFFER (XVECTOR (vector)->contents[i])); ++i; - Vdeactivate_mark = XVECTOR (vector)->contents[i]; ++i; - windows_or_buffers_changed = XFASTINT (XVECTOR (vector)->contents[i]); ++i; - - if (WINDOWP (XVECTOR (vector)->contents[i])) + set_buffer_internal_1 (XBUFFER (AREF (vector, 0))); + Vdeactivate_mark = AREF (vector, 1); + windows_or_buffers_changed = XFASTINT (AREF (vector, 2)); + + if (WINDOWP (AREF (vector, 3))) { struct window *w; Lisp_Object buffer, charpos, bytepos; - w = XWINDOW (XVECTOR (vector)->contents[i]); ++i; - buffer = XVECTOR (vector)->contents[i]; ++i; - charpos = XVECTOR (vector)->contents[i]; ++i; - bytepos = XVECTOR (vector)->contents[i]; ++i; + w = XWINDOW (AREF (vector, 3)); + buffer = AREF (vector, 4); + charpos = AREF (vector, 5); + bytepos = AREF (vector, 6); w->buffer = buffer; set_marker_both (w->pointm, buffer, @@ -6033,8 +6032,14 @@ /* Switch to that buffer and clear it. */ set_buffer_internal (XBUFFER (echo_area_buffer[0])); + if (Z > BEG) - del_range (BEG, Z); + { + int count = BINDING_STACK_SIZE (); + specbind (Qinhibit_read_only, Qt); + del_range (BEG, Z); + unbind_to (count, Qnil); + } TEMP_SET_PT_BOTH (BEG, BEG_BYTE); /* Set up the buffer for the multibyteness we need. */