[gedit] Also grok c-basic-offset in emacs modelines



commit 56773dae84d53701f343cc053744134ccb7e313b
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 cb942d8..33de301 100644
--- a/plugins/modelines/modeline-parser.c
+++ b/plugins/modelines/modeline-parser.c
@@ -425,7 +425,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]