summaryrefslogtreecommitdiffstats
path: root/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el')
-rw-r--r--data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el80
1 files changed, 29 insertions, 51 deletions
diff --git a/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el b/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el
index 03b2ebf..998a423 100644
--- a/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el
+++ b/data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el
@@ -7,8 +7,9 @@
;; Author: Ralph Amissah & Ambrose Kofi Laing
;; Keywords: text, syntax, processes, tools
-;; Version: 7.1.6 2015-12-14 Ralph Amissah,
-;; 5.7.2 2014-10-28 Ralph Amissah,
+;; Version: 7.1.7 2015-12-26 Ralph Amissah,
+;; including patch from Kevin Ryde;
+;; 5.7.2 2014-10-28 Ralph Amissah;
;; 4.0.8 2013-02-17 Ralph Amissah;
;; 3.0.7 2011-04-20 Ambrose Kofi Laing & Ralph Amissah;
;; 2008-12-14
@@ -31,7 +32,7 @@
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;; along with this program. If not, see [http://www.gnu.org/licenses/].
;; Viva Software Libre!
;; Support the free software movement!
@@ -140,7 +141,14 @@
(defconst sisu-font-lock-keywords
(eval-when-compile
(list
-
+ ;;grouped text ---------
+ ;(cons "^```[ ]code\\(.\\|\n\\)+?\n```\n" 'general-font-lock-red2)
+ (cons "^```[ ]+code.*?$\\|^```$" 'general-font-lock-red2)
+ (cons "^```[ ]+table.*?$\\|^```$" 'general-font-lock-red2)
+ (cons "^```[ ]+group$\\|^```$" 'general-font-lock-red2)
+ (cons "^```[ ]+block$\\|^```$" 'general-font-lock-red2)
+ (cons "^```[ ]+poem$\\|^```$" 'general-font-lock-red2)
+ (cons "^```[ ]+alt$\\|^```$" 'general-font-lock-red2)
;;grouped text ---------
(cons "^group\{\\|^\}group" 'general-font-lock-red2)
(cons "^block\{\\|^\}block" 'general-font-lock-red2)
@@ -152,31 +160,9 @@
(list
(concat
- "^\\(\`\\{3\\}[ ]+code\\)"
- "\\([^\`]+\\)" ;not satisfactory how to not match three repeated tics ` and how to specify only this type of tic ` (open single quote)
- ;"\\([^\`]\\{3\\}\\)" ; nope
- ;"\\([^\`]\\)\\{3\\}" ; ; nope
- "\\(\`\\{3\\}\\)$"
- )
- '(1 general-font-lock-red2 t)
- '(2 nil t)
- '(3 general-font-lock-red2 t)
- )
- (list
- (concat
- "^\\(\`\\{3\\}[ ]+group\\)"
- "\\([^\`]+\\)" ;not satisfactory how to not match three repeated tics ` and how to specify only this type of tic ` (open single quote)
- "\\(\`\\{3\\}\\)$"
- )
- '(1 general-font-lock-red2 t)
- '(2 nil t)
- '(3 general-font-lock-red2 t)
- )
- (list
- (concat
- "^\\(\`\\{3\\}[ ]+block\\)"
- "\\([^\`]+\\)" ;not satisfactory how to not match three repeated tics ` and how to specify only this type of tic ` (open single quote)
- "\\(\`\\{3\\}\\)$"
+ "^\`\\{3\\}[ ]+code.*?$"
+ "\\(.\\|\n\\)+?"
+ "\`\\{3\\}$"
)
'(1 general-font-lock-red2 t)
'(2 nil t)
@@ -184,9 +170,9 @@
)
(list
(concat
- "^\\(\`\\{3\\}[ ]+poem\\)"
- "\\([^\`]+\\)" ;not satisfactory how to not match three repeated tics ` and how to specify only this type of tic ` (open single quote)
- "\\(\`\\{3\\}\\)$"
+ "^\`\\{3\\}[ ]+table.*?$"
+ "\\(.\\|\n\\)+?"
+ "\`\\{3\\}$"
)
'(1 general-font-lock-red2 t)
'(2 nil t)
@@ -194,19 +180,9 @@
)
(list
(concat
- "^\\(\`\\{3\\}[ ]+alt\\)"
- "\\([^\`]+\\)" ;not satisfactory how to not match three repeated tics ` and how to specify only this type of tic ` (open single quote)
- "\\(\`\\{3\\}\\)$"
- )
- '(1 general-font-lock-red2 t)
- '(2 nil t)
- '(3 general-font-lock-red2 t)
- )
- (list
- (concat
- "^\\(\`\\{3\\}[ ]+table\\)"
- "\\([^\`]+\\)" ;not satisfactory how to not match three repeated tics ` and how to specify only this type of tic ` (open single quote)
- "\\(\`\\{3\\}\\)$"
+ "^\`\\{3\\}[ ]+\\(group\\|block\\|alt\\|poem\\)$"
+ "\\(.\\|\n\\)+?"
+ "^\`\\{3\\}$"
)
'(1 general-font-lock-red2 t)
'(2 nil t)
@@ -470,8 +446,7 @@
;; enables outlining for sisu
(add-hook 'sisu-mode-hook
'(lambda ()
- (outline-minor-mode)
- (setq outline-regexp "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\|\\@[a-z]+:\\( \\|$\\)\\)")))
+ (outline-minor-mode)))
;;; outline mode "folding" if available
;;; TODO make sure linum (line numbering) is off, else performance penalty, sucks bigtime
@@ -491,7 +466,6 @@
;; C-c @ C-d hide subtree at cursor location
;; Sisu & Autoload:
-;; ##autoload
(define-derived-mode sisu-mode text-mode "SiSU"
"Major mode for editing SiSU files."
(interactive)
@@ -505,6 +479,9 @@
(make-local-variable 'paragraph-ignore-fill-prefix)
(setq paragraph-ignore-fill-prefix t)
+ (set (make-local-variable 'outline-regexp)
+ "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\|\\@[a-z]+:\\( \\|$\\)\\)")
+
(make-local-variable 'require-final-newline)
(setq require-final-newline t)
@@ -517,9 +494,10 @@
))
(run-hooks 'sisu-mode-hook))
-(add-to-list 'auto-mode-alist '("\\.sst$" . sisu-mode))
-(add-to-list 'auto-mode-alist '("\\.ssm$" . sisu-mode))
-(add-to-list 'auto-mode-alist '("\\.ssi$" . sisu-mode))
+;; ##autoload
+(add-to-list 'auto-mode-alist '("\\.sst\\'" . sisu-mode))
+(add-to-list 'auto-mode-alist '("\\.ssm\\'" . sisu-mode))
+(add-to-list 'auto-mode-alist '("\\.ssi\\'" . sisu-mode))
;;;; ChangeLog: