emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109520: * src/xdisp.c (safe_eval_han


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109520: * src/xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
Date: Wed, 08 Aug 2012 15:53:44 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109520
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2012-08-08 15:53:44 -0400
message:
  * 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.
modified:
  src/ChangeLog
  src/eval.c
  src/lisp.h
  src/w32term.c
  src/xdisp.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-08-08 14:47:11 +0000
+++ b/src/ChangeLog     2012-08-08 19:53:44 +0000
@@ -1,3 +1,10 @@
+2012-08-08  Stefan Monnier  <address@hidden>
+
+       * 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  <address@hidden>
 
        Inline functions to examine and change buffer overlays.

=== modified file 'src/eval.c'
--- a/src/eval.c        2012-08-07 13:37:21 +0000
+++ b/src/eval.c        2012-08-08 19:53:44 +0000
@@ -1399,7 +1399,9 @@
                           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 @@
   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;

=== modified file 'src/lisp.h'
--- a/src/lisp.h        2012-08-08 10:23:04 +0000
+++ b/src/lisp.h        2012-08-08 19:53:44 +0000
@@ -2952,7 +2952,9 @@
 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);

=== modified file 'src/w32term.c'
--- a/src/w32term.c     2012-08-07 07:33:18 +0000
+++ b/src/w32term.c     2012-08-08 19:53:44 +0000
@@ -5493,7 +5493,7 @@
 
 
 /* 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 @@
           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;
         }
     }

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2012-08-08 14:47:11 +0000
+++ b/src/xdisp.c       2012-08-08 19:53:44 +0000
@@ -838,7 +838,6 @@
 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 @@
 /* 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;
 }
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]