Commit b1cf96de authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* buffer.c (Fmake_overlay, Fmove_overlay):

* intervals.c (set_point_from_marker):
* print.c (PRINTPREPARE): Prefer signal_error
to plain error and report unsuitable marker too.
parent ec5e7504
2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
* buffer.c (Fmake_overlay, Fmove_overlay):
* intervals.c (set_point_from_marker):
* print.c (PRINTPREPARE): Prefer signal_error
to plain error and report unsuitable marker too.
2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
* xterm.h (struct scroll_bar): Prefer int to Lisp_Object
......
......@@ -3834,7 +3834,8 @@ for the front of the overlay advance when text is inserted there
The fifth arg REAR-ADVANCE, if non-nil, makes the marker
for the rear of the overlay advance when text is inserted there
\(which means the text *is* included in the overlay). */)
(Lisp_Object beg, Lisp_Object end, Lisp_Object buffer, Lisp_Object front_advance, Lisp_Object rear_advance)
(Lisp_Object beg, Lisp_Object end, Lisp_Object buffer,
Lisp_Object front_advance, Lisp_Object rear_advance)
{
Lisp_Object overlay;
struct buffer *b;
......@@ -3843,12 +3844,11 @@ for the rear of the overlay advance when text is inserted there
XSETBUFFER (buffer, current_buffer);
else
CHECK_BUFFER (buffer);
if (MARKERP (beg)
&& ! EQ (Fmarker_buffer (beg), buffer))
error ("Marker points into wrong buffer");
if (MARKERP (end)
&& ! EQ (Fmarker_buffer (end), buffer))
error ("Marker points into wrong buffer");
if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer))
signal_error ("Marker points into wrong buffer", beg);
if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
signal_error ("Marker points into wrong buffer", end);
CHECK_NUMBER_COERCE_MARKER (beg);
CHECK_NUMBER_COERCE_MARKER (end);
......@@ -3974,12 +3974,10 @@ buffer. */)
if (NILP (Fbuffer_live_p (buffer)))
error ("Attempt to move overlay to a dead buffer");
if (MARKERP (beg)
&& ! EQ (Fmarker_buffer (beg), buffer))
error ("Marker points into wrong buffer");
if (MARKERP (end)
&& ! EQ (Fmarker_buffer (end), buffer))
error ("Marker points into wrong buffer");
if (MARKERP (beg) && !EQ (Fmarker_buffer (beg), buffer))
signal_error ("Marker points into wrong buffer", beg);
if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
signal_error ("Marker points into wrong buffer", end);
CHECK_NUMBER_COERCE_MARKER (beg);
CHECK_NUMBER_COERCE_MARKER (end);
......
......@@ -1827,7 +1827,7 @@ void
set_point_from_marker (Lisp_Object marker)
{
if (XMARKER (marker)->buffer != current_buffer)
error ("Marker points into wrong buffer");
signal_error ("Marker points into wrong buffer", marker);
set_point_both
(clip_to_bounds (BEGV, marker_position (marker), ZV),
clip_to_bounds (BEGV_BYTE, marker_byte_position (marker), ZV_BYTE));
......
......@@ -124,7 +124,8 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
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"); \
signal_error ("Marker is outside the accessible " \
"part of the buffer", printcharfun); \
old_point = PT; \
old_point_byte = PT_BYTE; \
SET_PT_BOTH (marker_pos, \
......@@ -136,10 +137,10 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
if (NILP (printcharfun)) \
{ \
Lisp_Object string; \
if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \
if (NILP (BVAR (current_buffer, enable_multibyte_characters)) \
&& ! print_escape_multibyte) \
specbind (Qprint_escape_multibyte, Qt); \
if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \
if (! NILP (BVAR (current_buffer, enable_multibyte_characters)) \
&& ! print_escape_nonascii) \
specbind (Qprint_escape_nonascii, Qt); \
if (print_buffer != 0) \
......@@ -166,7 +167,7 @@ bool print_output_debug_flag EXTERNALLY_VISIBLE = 1;
if (NILP (printcharfun)) \
{ \
if (print_buffer_pos != print_buffer_pos_byte \
&& NILP (BVAR (current_buffer, enable_multibyte_characters))) \
&& NILP (BVAR (current_buffer, enable_multibyte_characters)))\
{ \
unsigned char *temp = alloca (print_buffer_pos + 1); \
copy_text ((unsigned char *) print_buffer, temp, \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment