[gnome-builder/wip/libide] libide: parse modelines after applying file-settings
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: parse modelines after applying file-settings
- Date: Wed, 18 Mar 2015 21:12:17 +0000 (UTC)
commit 7d3ec40f34f71451da9d8a8753efd79ba3b23f56
Author: Christian Hergert <christian hergert me>
Date: Wed Mar 18 14:11:11 2015 -0700
libide: parse modelines after applying file-settings
One might argue that we should have an IdeModelineFileSettings. And at
first, I'd agree. However, that would mean we have to read entire files
to discover them (before we load the buffer). Therefore, I'm okay with
always applying modelines, and doing so after applying file settings.
One thing that we lose here, is the ability for ide-list-file-settings
tool being completely correct.
Anyway, such is life.
libide/ide-source-view.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 581f202..b18d55e 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -54,6 +54,8 @@
#include "ide-source-view-mode.h"
#include "ide-source-view-movements.h"
+#include "modeline-parser.h"
+
#define DEFAULT_FONT_DESC "Monospace 11"
#define ANIMATION_X_GROW 50
#define ANIMATION_Y_GROW 30
@@ -834,6 +836,8 @@ ide_source_view_connect_settings (IdeSourceView *self,
G_BINDING_SYNC_CREATE,
transform_indent_style_to_boolean,
NULL, NULL, NULL);
+
+ modeline_parser_apply_modeline (GTK_SOURCE_VIEW (self));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]