aboutsummaryrefslogtreecommitdiffhomepage
path: root/data/sisu/v2/conf/editor-syntax-etc/emacs/sisu-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'data/sisu/v2/conf/editor-syntax-etc/emacs/sisu-mode.el')
-rw-r--r--data/sisu/v2/conf/editor-syntax-etc/emacs/sisu-mode.el272
1 files changed, 115 insertions, 157 deletions
diff --git a/data/sisu/v2/conf/editor-syntax-etc/emacs/sisu-mode.el b/data/sisu/v2/conf/editor-syntax-etc/emacs/sisu-mode.el
index ba2633d3..5b5cec5c 100644
--- a/data/sisu/v2/conf/editor-syntax-etc/emacs/sisu-mode.el
+++ b/data/sisu/v2/conf/editor-syntax-etc/emacs/sisu-mode.el
@@ -1,7 +1,7 @@
;;; sisu-mode.el --- a major-mode for highlighting a hierarchy structured text.
;; @Author: Ambrose Kofi Laing (& Ralph Amissah)
;; @Keywords: text, processes, tools
-;; @Version: 0.70.1 2008-12-14
+;; @Version: 2.8.2 2011-03-11 (2008-12-14)
;; @License: GPLv3
;; @Home URL: SiSU: http://www.jus.uio.no/sisu
;; originally looked at (based on) doc-mode, with kind permission of the author
@@ -128,118 +128,127 @@
(list
;;grouped text
- (cons "^group\{\\|^\}group" 'general-font-lock-red2)
- (cons "^code\{\\|^\}code" 'general-font-lock-red2)
- (cons "^poem\{\\|^\}poem" 'general-font-lock-red2)
- (cons "^alt\{\\|^\}alt" 'general-font-lock-red2)
- (cons "^table\{.+\\|^\}table" 'general-font-lock-red2)
- (cons "^\{table[^}]+\}" 'general-font-lock-red2)
+ (cons "^group\{\\|^\}group" 'general-font-lock-red2)
+ (cons "^block\{\\|^\}block" 'general-font-lock-red2)
+ (cons "^code\{\\|^\}code" 'general-font-lock-red2)
+ (cons "^poem\{\\|^\}poem" 'general-font-lock-red2)
+ (cons "^alt\{\\|^\}alt" 'general-font-lock-red2)
+ (cons "^table\{.+\\|^\}table" 'general-font-lock-red2)
+ (cons "^\{table[^}]+\}" 'general-font-lock-red2)
;; footnote/endnote
- ;(cons "\~\{.+?\}\~" 'general-font-lock-green1)
- (cons "\~\{\\*\\*\\|\~\{\\*\\|\~\{\\|\}\~" 'general-font-lock-red2)
- (cons "\~\\[\\+\\|\~\\[\\*\\|\~\\[\\|\\]\~" 'general-font-lock-red2)
+ ;(cons "\~\{.+?\}\~" 'general-font-lock-green1)
+ (cons "\~\{\\*\\*\\|\~\{\\*\\|\~\{\\|\}\~" 'general-font-lock-red2)
+ (cons "\~\\[\\+\\|\~\\[\\*\\|\~\\[\\|\\]\~" 'general-font-lock-red2)
(cons "\~\\^ \\|^\\^\~ " 'general-font-lock-red2)
(list (concat
"\\(\*\~\\)"
- "\\([^ \r\t\n]+\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-blue2 t))
+ "\\([^ \r\t\n]+\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-blue2 t))
- ;; bold
+ ;; emphasis (can be program configured to be bold italics or underscore)
(list (concat
- "\\([*]\{\\)"
- "\\([^\}]+\\)"
- "\\(\}[*]\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-red1 t)
+ "\\([*]\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}[*]\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-red1 t))
+ ;; bold
(list (concat
- "\\([!]\{\\)"
- "\\([^\}]+\\)"
- "\\(\}[!]\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-red1 t)
+ "\\([!]\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}[!]\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-red1 t))
- (cons "\\*[^ ]+\\*" 'general-font-lock-red1)
- (cons "^!_ .+" 'general-font-lock-red1)
-
+ (cons "\\*[^ ]+\\*" 'general-font-lock-red1)
+ (cons "^!_ .+" 'general-font-lock-red1)
;;; italics
(list (concat
- "\\([/]\{\\)"
- "\\([^\}]+\\)"
- "\\(\}[/]\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-blue1 t)
+ "\\([/]\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}[/]\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-blue1 t)
'(3 general-font-lock-red1 t))
-
;; underscore
(list (concat
- "\\([_]\{\\)"
- "\\([^\}]+\\)"
- "\\(\}[_]\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-red1 t)
+ "\\([_]\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}[_]\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-red1 t)
+ '(3 general-font-lock-red1 t))
+
+ ;; monospace
+ (list (concat
+ "\\([#]\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}[#]\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-red1 t))
;; citation
(list (concat
- "\\([\"]\{\\)"
- "\\([^\}]+\\)"
- "\\(\}[\"]\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-red1 t)
+ "\\([\"]\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}[\"]\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-red1 t))
;; inserted text
(list (concat
- "\\([\+]\{\\)"
- "\\([^\}]+\\)"
- "\\(\}[\+]\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-red1 t)
+ "\\([\+]\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}[\+]\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-red1 t))
;; strike through
(list (concat
- "\\(\\-\{\\)"
- "\\([^\}]+\\)"
- "\\(\}\\-\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-red1 t)
+ "\\(\\-\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}\\-\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-red1 t))
;; superscript
(list (concat
- "\\(\\^\{\\)"
- "\\([^\}]+\\)"
- "\\(\}\\^\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-red1 t)
+ "\\(\\^\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}\\^\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-red1 t))
;; subscript
(list (concat
- "\\([,]\{\\)"
- "\\([^\}]+\\)"
- "\\(\}[,]\\)")
- '(1 general-font-lock-red1 t)
- '(2 general-font-lock-red1 t)
+ "\\([,]\{\\)"
+ "\\([^\}]+\\)"
+ "\\(\}[,]\\)")
+ '(1 general-font-lock-red1 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-red1 t))
;;numbered list
- (cons "^# \\|^_# " 'general-font-lock-red1)
+ (cons "^# \\|^_# " 'general-font-lock-red1)
;;bullet text
- (cons "^_\\*[1-9] \\|^_\\* " 'general-font-lock-red1)
+ (cons "^_\\*[1-9] \\|^_\\* " 'general-font-lock-red1)
;;indented text
- (cons "^_[1-9] " 'general-font-lock-red1)
+ (cons "^_[1-9] " 'general-font-lock-red1)
;;url
(cons "\\(^\\|[ ]\\)http:[/][/][^ \t\n\r<]+" 'general-font-lock-blue2)
@@ -247,118 +256,67 @@
;; \\|\$
;; Comment Lines
- (cons "^% .*" 'general-font-lock-blue1)
+ (cons "^% .*" 'general-font-lock-blue1)
;; line break
- (cons "<br>" 'general-font-lock-red1)
+ (cons "<br>" 'general-font-lock-red1)
;; Section titles
(list "^\\(\\([1-8]\\|:?[A-C]\\)\\~\\)\\(.*\\)"
- '(1 sisu-title-1 t)
- '(3 sisu-title-2 t))
+ '(1 sisu-title-1 t)
+ '(3 sisu-title-2 t))
;; hyper-links
(list (concat
- "\\(\{~^\\|\{\\)"
- "\\([^\}\{]+\\)"
- "\\(\}http:[/][/][^ \r\n\t<]+\\)")
- '(1 general-font-lock-blue2 t)
- '(2 general-font-lock-red1 t)
+ "\\(\{~^\\|\{\\)"
+ "\\([^\}\{]+\\)"
+ "\\(\}http:[/][/][^ \r\n\t<]+\\)")
+ '(1 general-font-lock-blue2 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-blue2 t))
;; book index
- (cons "^\=\{.+\}" 'general-font-lock-green1)
+ (cons "^\=\{.+\}" 'general-font-lock-green1)
;; numbers
- (cons "\\<[.0-9]+\\>" 'general-font-lock-green2)
+ (cons "\\<[.0-9]+\\>" 'general-font-lock-green2)
;; bullets sisu_normal (nearly copied regexp)
(cons "^_\\([1-9*]\\|[1-9]\\*\\) " 'general-font-lock-blue2)
;; image links
(list (concat
- "\\(\{\\)"
- "\\([^\}\{]+\\)"
- "\\(\}image\\)")
- '(1 general-font-lock-blue2 t)
- '(2 general-font-lock-red1 t)
+ "\\(\{\\)"
+ "\\([^\}\{]+\\)"
+ "\\(\}image\\)")
+ '(1 general-font-lock-blue2 t)
+ '(2 general-font-lock-red1 t)
'(3 general-font-lock-blue2 t))
;; insert file links
(list (concat
- "\\(<< \\)"
- "\\([^ \r\t\n]+\\.ss\\)"
- "\\(i\\|t\\)")
- '(1 general-font-lock-blue2 t)
- '(2 general-font-lock-blue2 t)
+ "\\(<< \\)"
+ "\\([^ \r\t\n]+\\.ss\\)"
+ "\\(i\\|t\\)")
+ '(1 general-font-lock-blue2 t)
+ '(2 general-font-lock-blue2 t)
'(3 general-font-lock-blue2 t))
;; raw keywords
(list (concat
- "^\\(\\@\\("
- "title\\|"
- "subtitle\\|"
- "author.title\\|"
- "author.nationality\\|"
- "author\\|creator\\|"
- "translator\\|translated_by\\|"
- "illustrator\\|illustrated_by\\|"
- "prepared_by\\|"
- "digitized_by\\|"
- "contributor\\|"
- "publisher\\|"
- "topic_register\\|"
- "subject\\|"
- "description\\|"
- "comment\\|"
- "type\\|"
- "format\\|"
- "source\\|"
- "language\.original\\|"
- "language\.document\\|"
- "language\\|"
- "rights\\|"
- "relation\\|"
- "coverage\\|"
- "keywords\\|"
- "comments\\|"
- "papersize\\|"
- "tags\\|"
- "catalogue\\|"
- "date.created\\|"
- "date.issued\\|"
- "date.available\\|"
- "date.modified\\|"
- "date.valid\\|"
- "date.added_to_site\\|"
- "date\\|"
- "original_publication.date\\|"
- "original_publication.nationality\\|"
- "original_publication.institution\\|"
- "original_publication\\|"
- "writing_focus.nationality\\|"
- "classify_loc\\|"
- "classify_dewey\\|"
- "classify_isbn\\|"
- "classify_pg\\|"
- "prefix\\|"
- "suffix\\|"
- "contact\\|"
- "links\\|"
- "structure\\|"
- "toc\\|"
- "level\\|"
- "page\\|"
- "markup\\|"
- "css\\|stylesheet\\|"
- "skin\\|"
- "abstract\\|"
- "bold\\|"
- "italics\\|"
- "doc_cont_idx\\|"
- "doc_content_index\\|"
- "\\):\\)\\(.*\\)")
- '(1 sisu-title-2 keep)
- '(3 sisu-title-3 keep))
+ "^\\(\\@\\("
+ "title\\|"
+ "creator\\|"
+ "date\\|"
+ "publisher\\|"
+ "rights\\|"
+ "classify\\|"
+ "original\\|"
+ "notes\\|"
+ "links\\|"
+ "make\\|"
+ "\\):\\)\\(.*\\)")
+ '(1 sisu-title-2 keep)
+ '(3 sisu-title-3 keep))
))
"Default expressions to highlight in AsciiSisu mode.")
@@ -386,11 +344,11 @@
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults
- '(sisu-font-lock-keywords
- nil ; KEYWORDS-ONLY: no
- nil ; CASE-FOLD: no
- ((?_ . "w")) ; SYNTAX-ALIST
- ))
+ '(sisu-font-lock-keywords
+ nil ; KEYWORDS-ONLY: no
+ nil ; CASE-FOLD: no
+ ((?_ . "w")) ; SYNTAX-ALIST
+ ))
(run-hooks 'sisu-mode-hook))
(provide 'sisu-mode)