]> git.eshelyaron.com Git - emacs.git/commitdiff
(PRINTPREPARE): Check if the marker PRINTCHARFUN is within the
authorLute Kamstra <lute@gnu.org>
Sat, 9 Apr 2005 08:43:23 +0000 (08:43 +0000)
committerLute Kamstra <lute@gnu.org>
Sat, 9 Apr 2005 08:43:23 +0000 (08:43 +0000)
accessible part of the buffer.

src/ChangeLog
src/print.c

index 2a7e88e4adf754598ad761f08b0142178b022b89..feb4351286990dfec6a7980efe497bbcc8724293 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-09  Lute Kamstra  <lute@gnu.org>
+
+       * print.c (PRINTPREPARE): Check if the marker PRINTCHARFUN is
+       within the accessible part of the buffer.
+
 2005-04-09  Kim F. Storm  <storm@cua.dk>
 
        * lread.c (readevalloop): Add args START and END as region in
@@ -41,8 +46,8 @@
 
 2005-04-01  Kenichi Handa  <handa@m17n.org>
 
-       * lisp.h (Vascii_upcase_table, Vascii_canon_table,
-       Vascii_eqv_table): Extern them.
+       * lisp.h (Vascii_upcase_table, Vascii_canon_table)
+       (Vascii_eqv_table): Extern them.
 
        * casetab.c (set_case_table): If standard is nonzero, setup
        Vascii_upcase_table, Vascii_canon_table, and Vascii_eqv_table.
index 8bb55f21248cc2d495487d70e727faa0198cb9d2..47e338e8492c24176023d81a2b07b1fc8a833dbd 100644 (file)
@@ -1,6 +1,6 @@
 /* Lisp object printing and output streams.
-   Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 01, 03, 2004
-       Free Software Foundation, Inc.
+   Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999,
+     2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -211,13 +211,17 @@ void print_interval ();
      }                                                                 \
    if (MARKERP (printcharfun))                                         \
      {                                                                 \
-       if (!(XMARKER (original)->buffer))                              \
+       EMACS_INT marker_pos;                                           \
+       if (!(XMARKER (printcharfun)->buffer))                          \
          error ("Marker does not point anywhere");                     \
-       if (XMARKER (original)->buffer != current_buffer)               \
-         set_buffer_internal (XMARKER (original)->buffer);             \
+       if (XMARKER (printcharfun)->buffer != current_buffer)           \
+         set_buffer_internal (XMARKER (printcharfun)->buffer);         \
+       marker_pos = marker_position (printcharfun);                    \
+       if (marker_pos < BEGV || marker_pos > ZV)                       \
+        error ("Marker is outside the accessible part of the buffer"); \
        old_point = PT;                                                 \
        old_point_byte = PT_BYTE;                                       \
-       SET_PT_BOTH (marker_position (printcharfun),                    \
+       SET_PT_BOTH (marker_pos,                                                \
                    marker_byte_position (printcharfun));               \
        start_point = PT;                                               \
        start_point_byte = PT_BYTE;                                     \