Commit cc92c454 authored by Stefan Monnier's avatar Stefan Monnier

* src/xdisp.c (safe_eval_handler): Remove prototype. Receive args describing

the failing expression, include them in the error message.
* src/eval.c (internal_condition_case_n): Pass nargs and args to hfun.
* src/lisp.h (internal_condition_case_n): Update declaration.
parent 4250fdf5
2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
* xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
the failing expression, include them in the error message.
* eval.c (internal_condition_case_n): Pass nargs and args to hfun.
* lisp.h (internal_condition_case_n): Update declaration.
2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
Inline functions to examine and change buffer overlays.
......
......@@ -1399,7 +1399,9 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *),
ptrdiff_t nargs,
Lisp_Object *args,
Lisp_Object handlers,
Lisp_Object (*hfun) (Lisp_Object))
Lisp_Object (*hfun) (Lisp_Object err,
ptrdiff_t nargs,
Lisp_Object *args))
{
Lisp_Object val;
struct catchtag c;
......@@ -1417,7 +1419,7 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *),
c.byte_stack = byte_stack_list;
if (_setjmp (c.jmp))
{
return (*hfun) (c.val);
return (*hfun) (c.val, nargs, args);
}
c.next = catchlist;
catchlist = &c;
......
......@@ -2952,7 +2952,9 @@ extern Lisp_Object internal_lisp_condition_case (Lisp_Object, Lisp_Object, Lisp_
extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object));
extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object));
extern Lisp_Object internal_condition_case_n
(Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *,
Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *));
extern void specbind (Lisp_Object, Lisp_Object);
extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object);
extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object);
......
......@@ -5493,7 +5493,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff,
/* Check if we need to resize the frame due to a fullscreen request.
If so needed, resize the frame. */
If so needed, resize the frame. */
static void
x_check_fullscreen (struct frame *f)
{
......@@ -5513,7 +5513,7 @@ x_check_fullscreen (struct frame *f)
SET_FRAME_GARBAGED (f);
cancel_mouse_face (f);
/* Wait for the change of frame size to occur */
/* Wait for the change of frame size to occur. */
f->want_fullscreen |= FULLSCREEN_WAIT;
}
}
......
......@@ -838,7 +838,6 @@ static int string_char_and_length (const unsigned char *, int *);
static struct text_pos display_prop_end (struct it *, Lisp_Object,
struct text_pos);
static int compute_window_start_on_continuation_line (struct window *);
static Lisp_Object safe_eval_handler (Lisp_Object);
static void insert_left_trunc_glyphs (struct it *);
static struct glyph_row *get_overlay_arrow_glyph_row (struct window *,
Lisp_Object);
......@@ -2397,9 +2396,10 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect)
/* Error handler for safe_eval and safe_call. */
static Lisp_Object
safe_eval_handler (Lisp_Object arg)
safe_eval_handler (Lisp_Object arg, ptrdiff_t nargs, Lisp_Object *args)
{
add_to_log ("Error during redisplay: %S", arg, Qnil);
add_to_log ("Error during redisplay: %S signalled %S",
Flist (nargs, args), arg);
return Qnil;
}
......
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