diff options
| author | Lute Kamstra | 2005-04-09 08:43:23 +0000 |
|---|---|---|
| committer | Lute Kamstra | 2005-04-09 08:43:23 +0000 |
| commit | 1cf21850176ab21c115d148d0f8e95209898e4b7 (patch) | |
| tree | dd0f288de1a9ba84268d26613cce93b5d7ece3b4 /src | |
| parent | 2a9e192d3815d2c34fdd41d52590027805bc9055 (diff) | |
| download | emacs-1cf21850176ab21c115d148d0f8e95209898e4b7.tar.gz emacs-1cf21850176ab21c115d148d0f8e95209898e4b7.zip | |
(PRINTPREPARE): Check if the marker PRINTCHARFUN is within the
accessible part of the buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 9 | ||||
| -rw-r--r-- | src/print.c | 16 |
2 files changed, 17 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2a7e88e4adf..feb43512869 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-04-09 Lute Kamstra <lute@gnu.org> | ||
| 2 | |||
| 3 | * print.c (PRINTPREPARE): Check if the marker PRINTCHARFUN is | ||
| 4 | within the accessible part of the buffer. | ||
| 5 | |||
| 1 | 2005-04-09 Kim F. Storm <storm@cua.dk> | 6 | 2005-04-09 Kim F. Storm <storm@cua.dk> |
| 2 | 7 | ||
| 3 | * lread.c (readevalloop): Add args START and END as region in | 8 | * lread.c (readevalloop): Add args START and END as region in |
| @@ -41,8 +46,8 @@ | |||
| 41 | 46 | ||
| 42 | 2005-04-01 Kenichi Handa <handa@m17n.org> | 47 | 2005-04-01 Kenichi Handa <handa@m17n.org> |
| 43 | 48 | ||
| 44 | * lisp.h (Vascii_upcase_table, Vascii_canon_table, | 49 | * lisp.h (Vascii_upcase_table, Vascii_canon_table) |
| 45 | Vascii_eqv_table): Extern them. | 50 | (Vascii_eqv_table): Extern them. |
| 46 | 51 | ||
| 47 | * casetab.c (set_case_table): If standard is nonzero, setup | 52 | * casetab.c (set_case_table): If standard is nonzero, setup |
| 48 | Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table. | 53 | Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table. |
diff --git a/src/print.c b/src/print.c index 8bb55f21248..47e338e8492 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Lisp object printing and output streams. | 1 | /* Lisp object printing and output streams. |
| 2 | Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 01, 03, 2004 | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | Free Software Foundation, Inc. | 3 | 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -211,13 +211,17 @@ void print_interval (); | |||
| 211 | } \ | 211 | } \ |
| 212 | if (MARKERP (printcharfun)) \ | 212 | if (MARKERP (printcharfun)) \ |
| 213 | { \ | 213 | { \ |
| 214 | if (!(XMARKER (original)->buffer)) \ | 214 | EMACS_INT marker_pos; \ |
| 215 | if (!(XMARKER (printcharfun)->buffer)) \ | ||
| 215 | error ("Marker does not point anywhere"); \ | 216 | error ("Marker does not point anywhere"); \ |
| 216 | if (XMARKER (original)->buffer != current_buffer) \ | 217 | if (XMARKER (printcharfun)->buffer != current_buffer) \ |
| 217 | set_buffer_internal (XMARKER (original)->buffer); \ | 218 | set_buffer_internal (XMARKER (printcharfun)->buffer); \ |
| 219 | marker_pos = marker_position (printcharfun); \ | ||
| 220 | if (marker_pos < BEGV || marker_pos > ZV) \ | ||
| 221 | error ("Marker is outside the accessible part of the buffer"); \ | ||
| 218 | old_point = PT; \ | 222 | old_point = PT; \ |
| 219 | old_point_byte = PT_BYTE; \ | 223 | old_point_byte = PT_BYTE; \ |
| 220 | SET_PT_BOTH (marker_position (printcharfun), \ | 224 | SET_PT_BOTH (marker_pos, \ |
| 221 | marker_byte_position (printcharfun)); \ | 225 | marker_byte_position (printcharfun)); \ |
| 222 | start_point = PT; \ | 226 | start_point = PT; \ |
| 223 | start_point_byte = PT_BYTE; \ | 227 | start_point_byte = PT_BYTE; \ |