diff options
| author | Gerd Moellmann | 2000-12-12 13:31:47 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-12-12 13:31:47 +0000 |
| commit | bbbf6d06b87c9761471947e7bacfd34d7c422a92 (patch) | |
| tree | 1743b75b91bb56c6b2535d24d0e0e93ee11f0267 | |
| parent | fc87a966be1954ece5234cd8be11a28645c3a7b9 (diff) | |
| download | emacs-bbbf6d06b87c9761471947e7bacfd34d7c422a92.tar.gz emacs-bbbf6d06b87c9761471947e7bacfd34d7c422a92.zip | |
(setup_echo_area_for_printing, with_echo_area_buffer):
Bind `inhibit-read-only' to t.
(unwind_with_echo_area_buffer): Use AREF.
| -rw-r--r-- | src/xdisp.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 13a9fa85b0f..bda00f34fca 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5920,6 +5920,7 @@ with_echo_area_buffer (w, which, fn, a1, a2, a3, a4) | |||
| 5920 | 5920 | ||
| 5921 | current_buffer->undo_list = Qt; | 5921 | current_buffer->undo_list = Qt; |
| 5922 | current_buffer->read_only = Qnil; | 5922 | current_buffer->read_only = Qnil; |
| 5923 | specbind (Qinhibit_read_only, Qt); | ||
| 5923 | 5924 | ||
| 5924 | if (clear_buffer_p && Z > BEG) | 5925 | if (clear_buffer_p && Z > BEG) |
| 5925 | del_range (BEG, Z); | 5926 | del_range (BEG, Z); |
| @@ -5987,21 +5988,19 @@ static Lisp_Object | |||
| 5987 | unwind_with_echo_area_buffer (vector) | 5988 | unwind_with_echo_area_buffer (vector) |
| 5988 | Lisp_Object vector; | 5989 | Lisp_Object vector; |
| 5989 | { | 5990 | { |
| 5990 | int i = 0; | 5991 | set_buffer_internal_1 (XBUFFER (AREF (vector, 0))); |
| 5991 | 5992 | Vdeactivate_mark = AREF (vector, 1); | |
| 5992 | set_buffer_internal_1 (XBUFFER (XVECTOR (vector)->contents[i])); ++i; | 5993 | windows_or_buffers_changed = XFASTINT (AREF (vector, 2)); |
| 5993 | Vdeactivate_mark = XVECTOR (vector)->contents[i]; ++i; | ||
| 5994 | windows_or_buffers_changed = XFASTINT (XVECTOR (vector)->contents[i]); ++i; | ||
| 5995 | 5994 | ||
| 5996 | if (WINDOWP (XVECTOR (vector)->contents[i])) | 5995 | if (WINDOWP (AREF (vector, 3))) |
| 5997 | { | 5996 | { |
| 5998 | struct window *w; | 5997 | struct window *w; |
| 5999 | Lisp_Object buffer, charpos, bytepos; | 5998 | Lisp_Object buffer, charpos, bytepos; |
| 6000 | 5999 | ||
| 6001 | w = XWINDOW (XVECTOR (vector)->contents[i]); ++i; | 6000 | w = XWINDOW (AREF (vector, 3)); |
| 6002 | buffer = XVECTOR (vector)->contents[i]; ++i; | 6001 | buffer = AREF (vector, 4); |
| 6003 | charpos = XVECTOR (vector)->contents[i]; ++i; | 6002 | charpos = AREF (vector, 5); |
| 6004 | bytepos = XVECTOR (vector)->contents[i]; ++i; | 6003 | bytepos = AREF (vector, 6); |
| 6005 | 6004 | ||
| 6006 | w->buffer = buffer; | 6005 | w->buffer = buffer; |
| 6007 | set_marker_both (w->pointm, buffer, | 6006 | set_marker_both (w->pointm, buffer, |
| @@ -6033,8 +6032,14 @@ setup_echo_area_for_printing (multibyte_p) | |||
| 6033 | 6032 | ||
| 6034 | /* Switch to that buffer and clear it. */ | 6033 | /* Switch to that buffer and clear it. */ |
| 6035 | set_buffer_internal (XBUFFER (echo_area_buffer[0])); | 6034 | set_buffer_internal (XBUFFER (echo_area_buffer[0])); |
| 6035 | |||
| 6036 | if (Z > BEG) | 6036 | if (Z > BEG) |
| 6037 | del_range (BEG, Z); | 6037 | { |
| 6038 | int count = BINDING_STACK_SIZE (); | ||
| 6039 | specbind (Qinhibit_read_only, Qt); | ||
| 6040 | del_range (BEG, Z); | ||
| 6041 | unbind_to (count, Qnil); | ||
| 6042 | } | ||
| 6038 | TEMP_SET_PT_BOTH (BEG, BEG_BYTE); | 6043 | TEMP_SET_PT_BOTH (BEG, BEG_BYTE); |
| 6039 | 6044 | ||
| 6040 | /* Set up the buffer for the multibyteness we need. */ | 6045 | /* Set up the buffer for the multibyteness we need. */ |