[gtksourceview] Doc: best practices for language definition files
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Doc: best practices for language definition files
- Date: Sun, 24 Nov 2013 15:44:15 +0000 (UTC)
commit 2aea283c037a5fa25e19823a2ef597bfcf109d16
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Nov 16 01:24:52 2013 +0100
Doc: best practices for language definition files
The list is added in the reference, not the tutorial. The tutorial is
read once, after that the people use the reference.
https://bugzilla.gnome.org/show_bug.cgi?id=652782
docs/reference/lang-reference.xml | 47 +++++++++++++++++++++++++++++++++++++
1 files changed, 47 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/lang-reference.xml b/docs/reference/lang-reference.xml
index 76d8d62..54196f8 100644
--- a/docs/reference/lang-reference.xml
+++ b/docs/reference/lang-reference.xml
@@ -33,6 +33,53 @@ should be installed on your system in the directory
</refsect1>
<refsect1>
+<title>Best practices</title>
+
+<para>
+It is better to follow the following rules, especially if you want to
+contribute upstream, and get your language definition file included in
+GtkSourceView.
+</para>
+
+<itemizedlist>
+ <listitem>
+ <para>
+ Indentation: 2 spaces.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Have the main context at the bottom.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Use references to def.lang.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ LGPL v2+ license (copy/paste the license header from c.lang, for
+ example).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Add the e-mail address of the language definition file author(s).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Refer to the HACKING file for submitting your language definition
+ file upstream. If the file is not included upstream, you can also
+ add the language definition file to the GtkSourceView wiki, so
+ users can easily find it.
+ </para>
+ </listitem>
+</itemizedlist>
+</refsect1>
+
+<refsect1>
<title>Tag <code><language></code></title>
<para>
The root element for Language Definition files.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]