[gedit/gnome-3-10] Also grok c-basic-offset in emacs modelines
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/gnome-3-10] Also grok c-basic-offset in emacs modelines
- Date: Mon, 3 Mar 2014 07:44:45 +0000 (UTC)
commit a9b8970c76c2fe26c32a1fc4789bb07b8c13865d
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Feb 23 09:58:53 2014 +0100
Also grok c-basic-offset in emacs modelines
It is specific to the emacs C mode, but it is very common. Treat it
as a synonym of indent-offset.
Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=721668
plugins/modelines/modeline-parser.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/modelines/modeline-parser.c b/plugins/modelines/modeline-parser.c
index 4dcd88e..af97ed3 100644
--- a/plugins/modelines/modeline-parser.c
+++ b/plugins/modelines/modeline-parser.c
@@ -426,7 +426,8 @@ parse_emacs_modeline (gchar *s,
options->set |= MODELINE_SET_TAB_WIDTH;
}
}
- else if (strcmp (key->str, "indent-offset") == 0)
+ else if (strcmp (key->str, "indent-offset") == 0 ||
+ strcmp (key->str, "c-basic-offset") == 0)
{
intval = atoi (value->str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]