From 6ff772b8d9c2b94c774fc47de8204685d53fa071 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 18 Apr 2015 13:04:57 +0000
Subject: [PATCH] Adding two files: syntax highlighting for Emacs Lisp and
 Guile Scheme. Patch by Mark Oteiza.  (Tweaked by Benno.)

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5204 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog               |  2 ++
 doc/syntax/Makefile.am  |  2 ++
 doc/syntax/elisp.nanorc | 31 +++++++++++++++++++++++++++++++
 doc/syntax/guile.nanorc | 24 ++++++++++++++++++++++++
 4 files changed, 59 insertions(+)
 create mode 100644 doc/syntax/elisp.nanorc
 create mode 100644 doc/syntax/guile.nanorc

diff --git a/ChangeLog b/ChangeLog
index 0f8e3aee..ed45ffab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-04-18  Mark Oteiza  <mvoteiza@udel.edu>
 	* doc/syntax/{python,ruby,sh,tex}.nanorc: Add a linter definition.
+	* doc/syntax/elisp.nanorc: New file; syntax highlighting for Elisp.
+	* doc/syntax/guile.nanorc: New file; syntax highlighting for Guile.
 
 2015-04-17  Benno Schulenberg  <bensberg@justemail.net>
 	* src/text.c (do_alt_speller, do_linter, do_formatter): Distinguish
diff --git a/doc/syntax/Makefile.am b/doc/syntax/Makefile.am
index 03bc8e3e..3428fb6a 100644
--- a/doc/syntax/Makefile.am
+++ b/doc/syntax/Makefile.am
@@ -6,10 +6,12 @@ pkgdata_DATA =	asm.nanorc \
 		css.nanorc \
 		debian.nanorc \
 		default.nanorc \
+		elisp.nanorc \
 		fortran.nanorc \
 		gentoo.nanorc \
 		go.nanorc \
 		groff.nanorc \
+		guile.nanorc \
 		html.nanorc \
 		java.nanorc \
 		javascript.nanorc \
diff --git a/doc/syntax/elisp.nanorc b/doc/syntax/elisp.nanorc
new file mode 100644
index 00000000..2a2bd2eb
--- /dev/null
+++ b/doc/syntax/elisp.nanorc
@@ -0,0 +1,31 @@
+## Here is an example for Emacs Lisp.
+
+syntax "elisp" "\.el$"
+
+# Basic functions/macros
+color brightcyan "\<(if|when|unless|cond|and|or|lambda|let|progn|while|dolist|dotimes)\>"
+color brightcyan "\<save-((window-)?excursion|restriction)\>"
+color brightcyan "\<eval-(and|when)-compile\>"
+# Defining functions
+color brightcyan "\<def(un|macro|subst|generic|alias)\>"
+color brightcyan "\<cl-def(un|macro|subst|generic|struct|type)\>"
+color brightcyan "\<define-(derived|minor|generic)-mode\>"
+# Defining variables
+color brightcyan "\<def(class|const|var(-local|alias)?)\>"
+# Customization functions
+color brightcyan "\<def(custom|face|group|theme)\>"
+# Setting values
+color brightcyan "\<(setq(-default|-local)?|setf|push|pop|declare(-function)?)\>"
+# Feature functions
+color brightcyan "\<(require|provide)\>"
+# Quoted symbols
+color brightyellow "#?'\<(\w|-)+\>"
+# Booleans
+color brightred "\<(t|nil)\>"
+# Keywords
+color blue ":(\w|[?-])+"
+# Strings
+color yellow start="^[[:blank:]]+\"" end="[^\]\""
+color yellow ""(\\.|[^"])*""
+# Comments
+color cyan "(^|[[:space:]]);.*$"
diff --git a/doc/syntax/guile.nanorc b/doc/syntax/guile.nanorc
new file mode 100644
index 00000000..1feb09b2
--- /dev/null
+++ b/doc/syntax/guile.nanorc
@@ -0,0 +1,24 @@
+## Here is an example for Guile Scheme.
+
+syntax "guile" "\.scm$"
+header "^#!.*guile"
+magic "guile"
+
+# Basic scheme functions
+color green "\<(do|if|lambda|let(rec)?|map|unless|when)\>"
+# Defining things
+color brightcyan "\<define(-macro|-module|-public|-syntax)?\>"
+# Quoted symbols
+color brightyellow "'\<(\w|-)+\>"
+# Chars
+color brightmagenta "#\\."
+color brightmagenta "#\\\w+\>"
+# Booleans
+color brightred "(#t|#f)\>"
+# Keywords
+color blue "#?:(\w|[?-])+"
+# Strings
+color yellow start="^[[:blank:]]+\"" end="[^\]\""
+color yellow ""(\\.|[^"])*""
+# Comments
+color cyan "(^|[[:space:]]);.*$"
-- 
GitLab