Commit c3f849ab authored by Roberto Majadas's avatar Roberto Majadas

emacs: close document command

parent 2a4da345
......@@ -191,6 +191,16 @@ gb_source_emacs_cmd_exit (GbSourceEmacs *emacs,
gb_widget_activate_action (GTK_WIDGET (priv->text_view), "app", "quit", NULL);
}
static void
gb_source_emacs_cmd_close_document (GbSourceEmacs *emacs,
GRegex *matcher,
GbSourceEmacsCommandFlags flags)
{
GbSourceEmacsPrivate *priv = GB_SOURCE_EMACS (emacs)->priv;
gb_widget_activate_action (GTK_WIDGET (priv->text_view), "stack", "close", NULL);
}
static void
gb_source_emacs_cmd_open_file (GbSourceEmacs *emacs,
GRegex *matcher,
......@@ -895,6 +905,10 @@ gb_source_emacs_class_init (GbSourceEmacsClass *klass)
g_regex_new("^C-x C-c$", 0, 0, NULL),
GB_SOURCE_EMACS_COMMAND_FLAG_NONE,
gb_source_emacs_cmd_exit);
gb_source_emacs_class_register_command (klass,
g_regex_new("^C-x k$", 0, 0, NULL),
GB_SOURCE_EMACS_COMMAND_FLAG_NONE,
gb_source_emacs_cmd_close_document);
gb_source_emacs_class_register_command (klass,
g_regex_new("^C-x C-f$", 0, 0, NULL),
GB_SOURCE_EMACS_COMMAND_FLAG_NONE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment