From bf1c0f273079b617703d7e875880db85da127493 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 20 Mar 2008 18:13:12 +0000 Subject: [PATCH] * fileio.c (Finsert_file_contents): * lread.c (Feval_buffer): Use BUF_TEMP_SET_PT. * buffer.h (BUF_SET_PT): Remove. set_point_both doesn't work right when buffer != current_buffer anyway. --- src/ChangeLog | 7 +++++++ src/buffer.h | 2 -- src/fileio.c | 4 ++-- src/lread.c | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 59904d09159..8d077381c8d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2008-03-20 Stefan Monnier + + * fileio.c (Finsert_file_contents): + * lread.c (Feval_buffer): Use BUF_TEMP_SET_PT. + * buffer.h (BUF_SET_PT): Remove. set_point_both doesn't work right + when buffer != current_buffer anyway. + 2008-03-20 Andreas Schwab * callint.c (Fcall_interactively) [case 'B']: Use other-buffer diff --git a/src/buffer.h b/src/buffer.h index 5c2dd5bc143..eb1f0a71686 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -216,8 +216,6 @@ Boston, MA 02110-1301, USA. */ #define TEMP_SET_PT_BOTH(position, byte) \ (temp_set_point_both (current_buffer, (position), (byte))) -#define BUF_SET_PT(buffer, position) \ - (set_point ((buffer), (position))) #define BUF_TEMP_SET_PT(buffer, position) \ (temp_set_point ((buffer), (position))) diff --git a/src/fileio.c b/src/fileio.c index f478b4a1fad..fe05cf9d441 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4237,8 +4237,8 @@ variable `last-coding-system-used' to the coding system actually used. */) how_much += this; - BUF_SET_PT (XBUFFER (conversion_buffer), - BUF_Z (XBUFFER (conversion_buffer))); + BUF_TEMP_SET_PT (XBUFFER (conversion_buffer), + BUF_Z (XBUFFER (conversion_buffer))); decode_coding_c_string (&coding, read_buf, unprocessed + this, conversion_buffer); unprocessed = coding.carryover_bytes; diff --git a/src/lread.c b/src/lread.c index c1ee53056ac..77c7a3c875f 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1850,7 +1850,7 @@ This function preserves the position of point. */) specbind (Qeval_buffer_list, Fcons (buf, Veval_buffer_list)); specbind (Qstandard_output, tem); record_unwind_protect (save_excursion_restore, save_excursion_save ()); - BUF_SET_PT (XBUFFER (buf), BUF_BEGV (XBUFFER (buf))); + BUF_TEMP_SET_PT (XBUFFER (buf), BUF_BEGV (XBUFFER (buf))); readevalloop (buf, 0, filename, Feval, !NILP (printflag), unibyte, Qnil, Qnil, Qnil); unbind_to (count, Qnil); -- 2.39.2