From e9217d0f348ec1be6950630795ff940f5b556f8e Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 7 Feb 2022 10:37:08 +0800 Subject: Clean up more code from PGTK port * lisp/term/pgtk-win.el (pgtk-disown-selection-internal) (pgtk-get-selection-internal): Fix declarations for new calling conventions. * src/gtkutil.c (xg_frame_set_char_size, x_wm_set_size_hint): Clean up meaningless variables on PGTK. * src/pgtkfns.c (Fx_create_frame, syms_of_pgtkfns): Clean up meaningless variables and fix copied doc strings to use "skip". * src/pgtkim.c (im_context_commit_cb) (im_context_retrieve_surrounding_cb) (im_context_delete_surrounding_cb, make_color_string) (im_context_preedit_changed_cb, im_context_preedit_end_cb) (im_context_preedit_start_cb): Fix coding style. * src/pgtkselect.c (pgtk_selection_usable) (Fpgtk_disown_selection_internal, Fpgtk_get_selection_internal): Remove unused arguments. (syms_of_pgtkselect): Fix doc strings and old style variable declarations. * src/pgtkterm.c (x_set_offset, x_set_parent_frame) (syms_of_pgtkterm): Clean up doc strings and remove meaningless variables. --- src/pgtkim.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/pgtkim.c') diff --git a/src/pgtkim.c b/src/pgtkim.c index 8577ba2116e..e1fffafb611 100644 --- a/src/pgtkim.c +++ b/src/pgtkim.c @@ -25,7 +25,9 @@ along with GNU Emacs. If not, see . */ #include "pgtkterm.h" static void -im_context_commit_cb (GtkIMContext * imc, gchar * str, gpointer user_data) +im_context_commit_cb (GtkIMContext *imc, + gchar *str, + gpointer user_data) { struct pgtk_display_info *dpyinfo = user_data; struct frame *f = dpyinfo->im.focused_frame; @@ -39,21 +41,21 @@ im_context_commit_cb (GtkIMContext * imc, gchar * str, gpointer user_data) } static gboolean -im_context_retrieve_surrounding_cb (GtkIMContext * imc, gpointer user_data) +im_context_retrieve_surrounding_cb (GtkIMContext *imc, gpointer user_data) { gtk_im_context_set_surrounding (imc, "", -1, 0); return TRUE; } static gboolean -im_context_delete_surrounding_cb (GtkIMContext * imc, int offset, int n_chars, +im_context_delete_surrounding_cb (GtkIMContext *imc, int offset, int n_chars, gpointer user_data) { return TRUE; } static Lisp_Object -make_color_string (PangoAttrColor * pac) +make_color_string (PangoAttrColor *pac) { char buf[256]; sprintf (buf, "#%02x%02x%02x", @@ -62,7 +64,7 @@ make_color_string (PangoAttrColor * pac) } static void -im_context_preedit_changed_cb (GtkIMContext * imc, gpointer user_data) +im_context_preedit_changed_cb (GtkIMContext *imc, gpointer user_data) { struct pgtk_display_info *dpyinfo = user_data; struct frame *f = dpyinfo->im.focused_frame; @@ -149,7 +151,7 @@ im_context_preedit_changed_cb (GtkIMContext * imc, gpointer user_data) } static void -im_context_preedit_end_cb (GtkIMContext * imc, gpointer user_data) +im_context_preedit_end_cb (GtkIMContext *imc, gpointer user_data) { struct pgtk_display_info *dpyinfo = user_data; struct frame *f = dpyinfo->im.focused_frame; @@ -163,7 +165,7 @@ im_context_preedit_end_cb (GtkIMContext * imc, gpointer user_data) } static void -im_context_preedit_start_cb (GtkIMContext * imc, gpointer user_data) +im_context_preedit_start_cb (GtkIMContext *imc, gpointer user_data) { } -- cgit v1.2.3