[gnome-builder] emacs: find command



commit be982e7f3ff8df663e06d0c90b0c7f7c0faf28aa
Author: Roberto Majadas <roberto majadas openshine com>
Date:   Sun Feb 8 20:02:23 2015 +0100

    emacs: find command

 src/emacs/gb-source-emacs.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/src/emacs/gb-source-emacs.c b/src/emacs/gb-source-emacs.c
index b238a12..4f6f578 100644
--- a/src/emacs/gb-source-emacs.c
+++ b/src/emacs/gb-source-emacs.c
@@ -242,6 +242,16 @@ gb_source_emacs_cmd_save_all  (GbSourceEmacs           *emacs,
 }
 
 static void
+gb_source_emacs_cmd_find  (GbSourceEmacs           *emacs,
+                             GRegex                  *matcher,
+                             GbSourceEmacsCommandFlags flags)
+{
+  GbSourceEmacsPrivate *priv = GB_SOURCE_EMACS (emacs)->priv;
+
+  gb_widget_activate_action (GTK_WIDGET (priv->text_view), "editor-frame", "find", NULL);
+}
+
+static void
 gb_source_emacs_cmd_undo (GbSourceEmacs           *emacs,
                           GRegex                  *matcher,
                           GbSourceEmacsCommandFlags flags)
@@ -917,11 +927,15 @@ gb_source_emacs_class_init (GbSourceEmacsClass *klass)
                                           g_regex_new("^C-x C-s$", 0, 0, NULL),
                                           GB_SOURCE_EMACS_COMMAND_FLAG_NONE,
                                           gb_source_emacs_cmd_save_file);
-    gb_source_emacs_class_register_command (klass,
+  gb_source_emacs_class_register_command (klass,
                                           g_regex_new("^C-x s$", 0, 0, NULL),
                                           GB_SOURCE_EMACS_COMMAND_FLAG_NONE,
                                           gb_source_emacs_cmd_save_all);
   gb_source_emacs_class_register_command (klass,
+                                          g_regex_new("^C-s$", 0, 0, NULL),
+                                          GB_SOURCE_EMACS_COMMAND_FLAG_NONE,
+                                          gb_source_emacs_cmd_find);
+  gb_source_emacs_class_register_command (klass,
                                           g_regex_new("^C-x C-w$", 0, 0, NULL),
                                           GB_SOURCE_EMACS_COMMAND_FLAG_NONE,
                                           gb_source_emacs_cmd_save_file_as);


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