diff options
| author | Stefan Monnier | 2012-08-08 15:53:44 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-08-08 15:53:44 -0400 |
| commit | cc92c454ade571f06d04a7578139b561c799b204 (patch) | |
| tree | 4f81c2a0bd2a6e7f922e6b20b309a7d8b9f7d953 /src | |
| parent | 4250fdf5b34a9fddf6ee1cf12270d9e269c1aa6e (diff) | |
| download | emacs-cc92c454ade571f06d04a7578139b561c799b204.tar.gz emacs-cc92c454ade571f06d04a7578139b561c799b204.zip | |
* 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/eval.c | 6 | ||||
| -rw-r--r-- | src/lisp.h | 4 | ||||
| -rw-r--r-- | src/w32term.c | 4 | ||||
| -rw-r--r-- | src/xdisp.c | 6 |
5 files changed, 19 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3717b4400b2..4a570a51df4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing | ||
| 4 | the failing expression, include them in the error message. | ||
| 5 | * eval.c (internal_condition_case_n): Pass nargs and args to hfun. | ||
| 6 | * lisp.h (internal_condition_case_n): Update declaration. | ||
| 7 | |||
| 1 | 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru> | 8 | 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 9 | ||
| 3 | Inline functions to examine and change buffer overlays. | 10 | Inline functions to examine and change buffer overlays. |
diff --git a/src/eval.c b/src/eval.c index d648be81b8d..b531f790cc5 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1399,7 +1399,9 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *), | |||
| 1399 | ptrdiff_t nargs, | 1399 | ptrdiff_t nargs, |
| 1400 | Lisp_Object *args, | 1400 | Lisp_Object *args, |
| 1401 | Lisp_Object handlers, | 1401 | Lisp_Object handlers, |
| 1402 | Lisp_Object (*hfun) (Lisp_Object)) | 1402 | Lisp_Object (*hfun) (Lisp_Object err, |
| 1403 | ptrdiff_t nargs, | ||
| 1404 | Lisp_Object *args)) | ||
| 1403 | { | 1405 | { |
| 1404 | Lisp_Object val; | 1406 | Lisp_Object val; |
| 1405 | struct catchtag c; | 1407 | struct catchtag c; |
| @@ -1417,7 +1419,7 @@ internal_condition_case_n (Lisp_Object (*bfun) (ptrdiff_t, Lisp_Object *), | |||
| 1417 | c.byte_stack = byte_stack_list; | 1419 | c.byte_stack = byte_stack_list; |
| 1418 | if (_setjmp (c.jmp)) | 1420 | if (_setjmp (c.jmp)) |
| 1419 | { | 1421 | { |
| 1420 | return (*hfun) (c.val); | 1422 | return (*hfun) (c.val, nargs, args); |
| 1421 | } | 1423 | } |
| 1422 | c.next = catchlist; | 1424 | c.next = catchlist; |
| 1423 | catchlist = &c; | 1425 | catchlist = &c; |
diff --git a/src/lisp.h b/src/lisp.h index ea6f9dac249..025736e7fb5 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2952,7 +2952,9 @@ extern Lisp_Object internal_lisp_condition_case (Lisp_Object, Lisp_Object, Lisp_ | |||
| 2952 | extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2952 | extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2953 | extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2953 | extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2954 | extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2954 | extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object)); |
| 2955 | extern Lisp_Object internal_condition_case_n (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *, Lisp_Object, Lisp_Object (*) (Lisp_Object)); | 2955 | extern Lisp_Object internal_condition_case_n |
| 2956 | (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *, | ||
| 2957 | Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *)); | ||
| 2956 | extern void specbind (Lisp_Object, Lisp_Object); | 2958 | extern void specbind (Lisp_Object, Lisp_Object); |
| 2957 | extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); | 2959 | extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); |
| 2958 | extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); | 2960 | extern Lisp_Object unbind_to (ptrdiff_t, Lisp_Object); |
diff --git a/src/w32term.c b/src/w32term.c index 8108a1eb1c0..190919f7176 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5493,7 +5493,7 @@ x_set_offset (struct frame *f, register int xoff, register int yoff, | |||
| 5493 | 5493 | ||
| 5494 | 5494 | ||
| 5495 | /* Check if we need to resize the frame due to a fullscreen request. | 5495 | /* Check if we need to resize the frame due to a fullscreen request. |
| 5496 | If so needed, resize the frame. */ | 5496 | If so needed, resize the frame. */ |
| 5497 | static void | 5497 | static void |
| 5498 | x_check_fullscreen (struct frame *f) | 5498 | x_check_fullscreen (struct frame *f) |
| 5499 | { | 5499 | { |
| @@ -5513,7 +5513,7 @@ x_check_fullscreen (struct frame *f) | |||
| 5513 | SET_FRAME_GARBAGED (f); | 5513 | SET_FRAME_GARBAGED (f); |
| 5514 | cancel_mouse_face (f); | 5514 | cancel_mouse_face (f); |
| 5515 | 5515 | ||
| 5516 | /* Wait for the change of frame size to occur */ | 5516 | /* Wait for the change of frame size to occur. */ |
| 5517 | f->want_fullscreen |= FULLSCREEN_WAIT; | 5517 | f->want_fullscreen |= FULLSCREEN_WAIT; |
| 5518 | } | 5518 | } |
| 5519 | } | 5519 | } |
diff --git a/src/xdisp.c b/src/xdisp.c index 39a6067278f..3f1c97e601f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -838,7 +838,6 @@ static int string_char_and_length (const unsigned char *, int *); | |||
| 838 | static struct text_pos display_prop_end (struct it *, Lisp_Object, | 838 | static struct text_pos display_prop_end (struct it *, Lisp_Object, |
| 839 | struct text_pos); | 839 | struct text_pos); |
| 840 | static int compute_window_start_on_continuation_line (struct window *); | 840 | static int compute_window_start_on_continuation_line (struct window *); |
| 841 | static Lisp_Object safe_eval_handler (Lisp_Object); | ||
| 842 | static void insert_left_trunc_glyphs (struct it *); | 841 | static void insert_left_trunc_glyphs (struct it *); |
| 843 | static struct glyph_row *get_overlay_arrow_glyph_row (struct window *, | 842 | static struct glyph_row *get_overlay_arrow_glyph_row (struct window *, |
| 844 | Lisp_Object); | 843 | Lisp_Object); |
| @@ -2397,9 +2396,10 @@ remember_mouse_glyph (struct frame *f, int gx, int gy, NativeRectangle *rect) | |||
| 2397 | /* Error handler for safe_eval and safe_call. */ | 2396 | /* Error handler for safe_eval and safe_call. */ |
| 2398 | 2397 | ||
| 2399 | static Lisp_Object | 2398 | static Lisp_Object |
| 2400 | safe_eval_handler (Lisp_Object arg) | 2399 | safe_eval_handler (Lisp_Object arg, ptrdiff_t nargs, Lisp_Object *args) |
| 2401 | { | 2400 | { |
| 2402 | add_to_log ("Error during redisplay: %S", arg, Qnil); | 2401 | add_to_log ("Error during redisplay: %S signalled %S", |
| 2402 | Flist (nargs, args), arg); | ||
| 2403 | return Qnil; | 2403 | return Qnil; |
| 2404 | } | 2404 | } |
| 2405 | 2405 | ||