From 61c7438e2e99578646b0b4e1241cf081b867f8f9 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 11 Mar 2011 00:33:35 -0500 Subject: syntax highlighting updates, emacs, vim * emacs sisu headers updated (subheaders omitted for now) sisu-mode.el * vim cleaning sisu.vim --- data/doc/sisu/CHANGELOG_v2 | 6 +- data/doc/sisu/CHANGELOG_v3 | 4 + .../v2/conf/editor-syntax-etc/emacs/sisu-mode.el | 272 +++++++++------------ .../v2/conf/editor-syntax-etc/vim/syntax/sisu.vim | 22 +- data/sisu/v2/v/version.yml | 4 +- .../v3/conf/editor-syntax-etc/emacs/sisu-mode.el | 272 +++++++++------------ .../v3/conf/editor-syntax-etc/vim/syntax/sisu.vim | 30 ++- 7 files changed, 265 insertions(+), 345 deletions(-) diff --git a/data/doc/sisu/CHANGELOG_v2 b/data/doc/sisu/CHANGELOG_v2 index 3751d9dc..0997a951 100644 --- a/data/doc/sisu/CHANGELOG_v2 +++ b/data/doc/sisu/CHANGELOG_v2 @@ -12,7 +12,7 @@ Reverse Chronological: %% STABLE Branch -%% 2.8.2.orig.tar.gz (2011-03-10:10/4) +%% 2.8.2.orig.tar.gz (2011-03-11:10/5) http://www.jus.uio.no/sisu/pkg/src/sisu_2.8.2.orig.tar.gz sisu_2.8.2.orig.tar.gz sisu_2.8.2-1.dsc @@ -48,6 +48,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.8.2.orig.tar.gz * documentation more link fixes + * syntax highlighting + * emacs sisu headers updated (subheaders omitted for now) sisu-mode.el + * vim cleaning sisu.vim + %% 2.8.1.orig.tar.gz (2011-03-05:09/6) http://www.jus.uio.no/sisu/pkg/src/sisu_2.8.1.orig.tar.gz sisu_2.8.1.orig.tar.gz diff --git a/data/doc/sisu/CHANGELOG_v3 b/data/doc/sisu/CHANGELOG_v3 index 5148f8aa..dc148689 100644 --- a/data/doc/sisu/CHANGELOG_v3 +++ b/data/doc/sisu/CHANGELOG_v3 @@ -55,6 +55,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.3.orig.tar.gz * documentation more link fixes + * syntax highlighting + * emacs sisu headers updated (subheaders omitted for now) sisu-mode.el + * vim cleaning sisu.vim + %% 3.0.2.orig.tar.gz (2011-03-05:09/6) http://git.sisudoc.org/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/3.0.2-1 http://www.jus.uio.no/sisu/pkg/src/sisu_3.0.2.orig.tar.gz 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 "
" 'general-font-lock-red1) + (cons "
" '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) diff --git a/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim index 4bf5a045..e1077034 100644 --- a/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim +++ b/data/sisu/v2/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -1,6 +1,6 @@ "SiSU Vim syntax file "SiSU Maintainer: Ralph Amissah -"SiSU Markup: SiSU (sisu-2.7.10, 2010-12-16) +"SiSU Markup: SiSU (sisu-2.8.2, 2011-03-11) "(originally looked at Ruby Vim by Mirko Nasato) if version < 600 @@ -33,7 +33,7 @@ if !exists("sisu_no_identifiers") syn match sisu_sub_header_creator "^\s\+:\(author\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license syn match sisu_sub_header_classify "^\s\+:\(topic_register\|coverage\|format\|identifier\|keywords\|relation\|subject\|type\|dewey\|loc\|oclc\|pg\|isbn\):\s" - syn match sisu_sub_header_dates "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|plaintext_wrap\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" syn match sisu_sub_header_notes "^\s\+:\(abstract\comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" @@ -61,15 +61,14 @@ syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_actio "header syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_dates matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_source matchgroup=sisu_header start="^[@]source:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" "headings syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" "block/group text @@ -156,15 +155,14 @@ hi def link sisu_header PreProc hi def link sisu_header_content Normal hi def link sisu_sub_header_title Statement hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement hi def link sisu_sub_header_rights Statement hi def link sisu_sub_header_classify Statement -hi def link sisu_sub_header_dates Statement -hi def link sisu_sub_header_make Statement +hi def link sisu_sub_header_original Statement hi def link sisu_sub_header_links Statement -hi def link sisu_sub_header_publisher Statement hi def link sisu_sub_header_notes Statement -hi def link sisu_sub_header_original Statement -hi def link sisu_sub_header_source Statement +hi def link sisu_sub_header_make Statement hi def link sisu_heading Title hi def link sisu_structure Operator hi def link sisu_contain Include diff --git a/data/sisu/v2/v/version.yml b/data/sisu/v2/v/version.yml index a3fdf0dc..db91e9eb 100644 --- a/data/sisu/v2/v/version.yml +++ b/data/sisu/v2/v/version.yml @@ -1,5 +1,5 @@ --- :version: 2.8.2 -:date_stamp: 2011w10/4 -:date: "2011-03-10" +:date_stamp: 2011w10/5 +:date: "2011-03-11" :project: SiSU diff --git a/data/sisu/v3/conf/editor-syntax-etc/emacs/sisu-mode.el b/data/sisu/v3/conf/editor-syntax-etc/emacs/sisu-mode.el index ba2633d3..e8a668da 100644 --- a/data/sisu/v3/conf/editor-syntax-etc/emacs/sisu-mode.el +++ b/data/sisu/v3/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: 3.0.3 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 "
" 'general-font-lock-red1) + (cons "
" '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) diff --git a/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim index 2b67ee1b..aa24113d 100644 --- a/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim +++ b/data/sisu/v3/conf/editor-syntax-etc/vim/syntax/sisu.vim @@ -1,6 +1,6 @@ "SiSU Vim syntax file "SiSU Maintainer: Ralph Amissah -"SiSU Markup: SiSU (sisu-3.0.0, 2011-01-21) +"SiSU Markup: SiSU (sisu-3.0.3, 2011-03-11) "(originally looked at Ruby Vim by Mirko Nasato) if version < 600 @@ -18,11 +18,11 @@ if !exists("sisu_no_identifiers") syn match sisu_mark_endnote "\~^" syn match sisu_break contains=@NoSpell "
\|
" syn match sisu_control contains=@NoSpell "^<:p[bn]>\s*$" - syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pg\|pgn\|pn\)>\s*$" - syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pg\|pgn\|pn\)\]\s*$" + "syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pg\|pgn\|pn\)>\s*$" + "syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pg\|pgn\|pn\)\]\s*$" syn match sisu_control contains=@NoSpell "^<:\(bo\|---\)>\s*$" - syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pr\|o\)>\s*$" - syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pr\|o\)\]\s*$" + "syn match sisu_control contains=@NoSpell "^<\(br\)\?:\(pr\|o\)>\s*$" + "syn match sisu_control contains=@NoSpell "^\[\(br\)\?:\(pr\|o\)\]\s*$" syn match sisu_marktail "[~-]#" syn match sisu_control "\"" syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)" @@ -37,7 +37,7 @@ if !exists("sisu_no_identifiers") syn match sisu_sub_header_creator "^\s\+:\(author\|contributor\|illustrator\|photographer\|translator\|digitized_by\|prepared_by\|audio\|video\):\s" " &hon &institution syn match sisu_sub_header_rights "^\s\+:\(copyright\|text\|translation\|illustrations\|photographs\|preparation\|digitization\|audio\|video\|license\|all\):\s" " access_rights license syn match sisu_sub_header_classify "^\s\+:\(topic_register\|coverage\|format\|identifier\|keywords\|relation\|subject\|type\|dewey\|loc\|oclc\|pg\|isbn\):\s" - syn match sisu_sub_header_dates "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" + syn match sisu_sub_header_date "^\s\+:\(added_to_site\|available\|created\|issued\|modified\|published\|valid\|translated\|original_publication\):\s" syn match sisu_sub_header_original "^\s\+:\(publisher\|date\|language\|lang_char\|institution\|nationality\|source\):\s" syn match sisu_sub_header_make "^\s\+:\(headings\|num_top\|breaks\|language\|italics\|bold\|emphasis\|plaintext_wrap\|texpdf_font\|skin\|stamp\|promo\|ad\|manpage\):\s" syn match sisu_sub_header_notes "^\s\+:\(abstract\comment\|description\|history\|prefix\|prefix_[ab]\|suffix\):\s" @@ -65,15 +65,14 @@ syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_actio "header syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_title matchgroup=sisu_header start="^[@]title:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_creator matchgroup=sisu_header start="^[@]creator:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_date matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_rights matchgroup=sisu_header start="^[@]rights:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_classify matchgroup=sisu_header start="^[@]classify:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_dates matchgroup=sisu_header start="^[@]date:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_publisher matchgroup=sisu_header start="^[@]publisher:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_original matchgroup=sisu_header start="^[@]original:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" -syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_source matchgroup=sisu_header start="^[@]source:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_notes matchgroup=sisu_header start="^[@]notes:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_linked,sisu_sub_header_links matchgroup=sisu_header start="^[@]links:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" +syn region sisu_header_content contains=sisu_error,sisu_comment,sisu_break,sisu_link,sisu_sub_header_make matchgroup=sisu_header start="^[@]make:[+-]\?\(\s\|\n\)"rs=e-1 end="\n$" "headings syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" "block/group text @@ -160,15 +159,14 @@ hi def link sisu_header PreProc hi def link sisu_header_content Normal hi def link sisu_sub_header_title Statement hi def link sisu_sub_header_creator Statement +hi def link sisu_sub_header_date Statement +hi def link sisu_sub_header_publisher Statement hi def link sisu_sub_header_rights Statement hi def link sisu_sub_header_classify Statement -hi def link sisu_sub_header_dates Statement -hi def link sisu_sub_header_make Statement +hi def link sisu_sub_header_original Statement hi def link sisu_sub_header_links Statement -hi def link sisu_sub_header_publisher Statement hi def link sisu_sub_header_notes Statement -hi def link sisu_sub_header_original Statement -hi def link sisu_sub_header_source Statement +hi def link sisu_sub_header_make Statement hi def link sisu_heading Title hi def link sisu_structure Operator hi def link sisu_contain Include -- cgit v1.2.3