emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master e2a9800 7/7: Fit kill_buffer_xwidgets into 80


From: Paul Eggert
Subject: [Emacs-diffs] master e2a9800 7/7: Fit kill_buffer_xwidgets into 80
Date: Thu, 7 Jun 2018 22:11:58 -0400 (EDT)

branch: master
commit e2a98002020369cf0c09c7acf8557290e867705f
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Fit kill_buffer_xwidgets into 80
    
    * src/xwidget.c (kill_buffer_xwidgets): Reindent and use C99
    style to fit in 80 columns.
---
 src/xwidget.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/xwidget.c b/src/xwidget.c
index 32022ab..5f26512 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -749,8 +749,10 @@ argument procedure FUN.*/)
   /* JavaScript execution happens asynchronously.  If an elisp
      callback function is provided we pass it to the C callback
      procedure that retrieves the return value.  */
+  gchar *script_string
+    = XSAVE_POINTER (XCAR (AREF (xw->script_callbacks, idx)), 0);
   webkit_web_view_run_javascript (WEBKIT_WEB_VIEW (xw->widget_osr),
-                                  XSAVE_POINTER (XCAR (AREF 
(xw->script_callbacks, idx)), 0),
+                                 script_string,
                                   NULL, /* cancelable */
                                   webkit_javascript_finished_cb,
                                  (gpointer) idx);
@@ -1221,15 +1223,13 @@ kill_buffer_xwidgets (Lisp_Object buffer)
             gtk_widget_destroy (xw->widgetwindow_osr);
           }
        if (!NILP (xw->script_callbacks))
-         {
-           ptrdiff_t idx;
-           for (idx = 0; idx < ASIZE (xw->script_callbacks); idx++)
-             {
-               if (!NILP (AREF (xw->script_callbacks, idx)))
-                 xfree (XSAVE_POINTER (XCAR (AREF (xw->script_callbacks, 
idx)), 0));
-               ASET (xw->script_callbacks, idx, Qnil);
-             }
-         }
+         for (ptrdiff_t idx = 0; idx < ASIZE (xw->script_callbacks); idx++)
+           {
+             Lisp_Object cb = AREF (xw->script_callbacks, idx);
+             if (!NILP (cb))
+               xfree (XSAVE_POINTER (XCAR (cb), 0));
+             ASET (xw->script_callbacks, idx, Qnil);
+           }
       }
     }
 }



reply via email to

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