Mercurial > emacs
comparison src/print.c @ 61407:88c04d73f43d
(PRINTPREPARE): Check if the marker PRINTCHARFUN is within the
accessible part of the buffer.
author | Lute Kamstra <lute@gnu.org> |
---|---|
date | Sat, 09 Apr 2005 08:42:30 +0000 |
parents | 1f8360dd535b |
children | a8fa7c632ee4 9deb6323655c 146c086df160 |
comparison
equal
deleted
inserted
replaced
61406:a2d3e29d8373 | 61407:88c04d73f43d |
---|---|
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 |
7 GNU Emacs is free software; you can redistribute it and/or modify | 7 GNU Emacs is free software; you can redistribute it and/or modify |
8 it under the terms of the GNU General Public License as published by | 8 it under the terms of the GNU General Public License as published by |
209 Fset_buffer (printcharfun); \ | 209 Fset_buffer (printcharfun); \ |
210 printcharfun = Qnil; \ | 210 printcharfun = Qnil; \ |
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; \ |
224 printcharfun = Qnil; \ | 228 printcharfun = Qnil; \ |
225 } \ | 229 } \ |