diff options
| -rw-r--r-- | data/doc/sisu/CHANGELOG_v4 | 4 | ||||
| -rw-r--r-- | data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el | 467 | 
2 files changed, 232 insertions, 239 deletions
| diff --git a/data/doc/sisu/CHANGELOG_v4 b/data/doc/sisu/CHANGELOG_v4 index c3b1ff74..c050390e 100644 --- a/data/doc/sisu/CHANGELOG_v4 +++ b/data/doc/sisu/CHANGELOG_v4 @@ -36,6 +36,10 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_4.0.8.orig.tar.xz      (to be usable tweak .Xdefaults) gui provided along with Xdefault settings to      make cterm match this gui or def256* +* v4: emacs, sisu-mode.el +  * sisu headers update +  * cosmetic code reshuffle +  %% 4.0.7.orig.tar.xz (2013-02-10:05/7)  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/sisu_4.0.7  http://sources.sisudoc.org/gitweb/?p=code/sisu.git;a=shortlog;h=refs/tags/debian/sisu_4.0.7-1 diff --git a/data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el b/data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el index 84e7cbef..1fb0feec 100644 --- a/data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el +++ b/data/sisu/v4/conf/editor-syntax-etc/emacs/sisu-mode.el @@ -1,7 +1,9 @@  ;;; sisu-mode.el --- a major-mode for highlighting a hierarchy structured text.  ;; @Author: Ambrose Kofi Laing & Ralph Amissah  ;; @Keywords: text, syntax, processes, tools -;; @Version: 3.0.7 2011-04-20 (2008-12-14) +;; @Version: 4.0.8 2013-02-17 (3.0.7 2011-04-20) (2008-12-14) +;;   [3.0.7 2011-04-20 Ambrose Kofi Laing & Ralph Amissah] +;;   [4.0.8 2013-02-17 Ralph Amissah]  ;; @URL: <http://git.sisudoc.org/?p=code/sisu.git;a=blob;f=data/sisu/v3/conf/editor-syntax-etc/emacs/sisu-mode.el;hb=HEAD>  ;; @Copyright: Assigned to FSF 2011-04-08 (GNU EMACS)  ;; @License: GPLv3 @@ -16,10 +18,8 @@  ;;  ;  Viva Software Libre!  ;; Support the free software movement! -;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;;{{{ Commentary: - +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Commentary:  ;;  ;; To enter sisu-mode automatically, add (autoload 'sisu-mode "sisu-mode")  ;; to your .emacs file and change the first line of your sisu file to: @@ -29,23 +29,16 @@  ;; To handle .sisu files, e.g., 'filename.sisu', add something like  ;; (add-to-list 'auto-mode-alist '("\\.sisu$" . sisu-mode))  ;; to your .emacs file -  ;;  ;; The documentation for the "Structure Of The Hierarchy Text" can be found in  ;; the sisustring for the sisu-mode function.  ;; - -;;}}} - -;;{{{ Variables: - +;; Variables:  (defgroup sisu-faces nil    "AsciiSisu highlighting"    :group 'sisus) -  ;; == Colors  ; color n is more prominent than color n+1 -  (defface sisu-title-1-face    `((((class color)        (background dark)) @@ -56,7 +49,6 @@      (t (:weight bold :inherit variable-pitch)))    "Face for AsciiSisu titles at level 1."    :group 'sisu-faces) -  (defface sisu-title-2-face    `((((class color)        (background dark)) @@ -67,7 +59,6 @@      (t (:weight bold :inherit variable-pitch)))    "Face for AsciiSisu titles at level 2."    :group 'sisu-faces) -  (defface sisu-title-3-face    `((((class color)        (background dark)) @@ -78,7 +69,6 @@      (t (:weight bold)))    "Face for AsciiSisu titles at level 3."    :group 'sisu-faces) -  (defface sisu-title-4-face    `((((class color)        (background dark)) @@ -89,269 +79,271 @@      (t ()))    "Face for AsciiSisu titles at level 4."    :group 'sisu-faces) -  (defface info-node    '((((class color) (background light)) (:foreground "brown" :bold t :italic t))      (((class color) (background dark)) (:foreground "white" :bold t :italic t))      (t (:bold t :italic t)))    "Face for Info node names."    :group 'sisu-faces) -  (defvar sisu-title-1 'sisu-title-1-face)  (defvar sisu-title-2 'sisu-title-2-face)  (defvar sisu-title-3 'sisu-title-3-face)  (defvar sisu-title-4 'sisu-title-4-face) -  (defvar general-font-lock-red1 font-lock-warning-face)  (defvar general-font-lock-red2 font-lock-comment-face)  (defvar general-font-lock-red3 font-lock-string-face) -  (defvar general-font-lock-green1 font-lock-type-face)  (defvar general-font-lock-green2 font-lock-constant-face) -  (defvar general-font-lock-blue1 font-lock-keyword-face)  (defvar general-font-lock-blue2 font-lock-function-name-face)  (defvar general-font-lock-blue3 font-lock-builtin-face) -  (defvar general-font-lock-yellow1 font-lock-variable-name-face)  (defvar general-font-lock-yellow2 font-lock-comment-face) -  ;; == sisu-mode settings -  (defvar sisu-mode-hook nil    "Normal hook run when entering Sisu Text mode.") -  (defvar sisu-mode-abbrev-table nil    "Abbrev table in use in Sisu-mode buffers.")  (define-abbrev-table 'sisu-mode-abbrev-table ()) -  (defconst sisu-font-lock-keywords    (eval-when-compile      (list - -     ;;grouped text -     (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-red2) - -     (list (concat -      "\\(\*\~\\)" -      "\\([^ \r\t\n]+\\)") -     '(1 general-font-lock-red1 t) -     '(2 general-font-lock-blue2 t)) - -     ;; 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) -     '(3 general-font-lock-red1 t)) - -     ;; bold -     (list (concat -      "\\([!]\{\\)" -      "\\([^\}]+\\)" -      "\\(\}[!]\\)") -     '(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) - -     ;;; italics -     (list (concat -      "\\([/]\{\\)" -      "\\([^\}]+\\)" -      "\\(\}[/]\\)") -     '(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) -           '(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) -           '(3 general-font-lock-red1 t)) - -     ;; inserted text -     (list (concat -      "\\([\+]\{\\)" -      "\\([^\}]+\\)" -      "\\(\}[\+]\\)") -     '(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) -           '(3 general-font-lock-red1 t)) - -     ;; superscript -     (list (concat -      "\\(\\^\{\\)" -      "\\([^\}]+\\)" -      "\\(\}\\^\\)") -     '(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) -           '(3 general-font-lock-red1 t)) - -     ;;numbered list -     (cons "^# \\|^_# "                'general-font-lock-red1) - -     ;;bullet text -     (cons "^_\\*[1-9] \\|^_\\* "      'general-font-lock-red1) - -     ;;indented text -     (cons "^_[1-9] "                  'general-font-lock-red1) -     (cons "^_[1-9]! "                 'general-font-lock-red1) - -     ;hanging indented text [proposed enable when implemented] +      ;;grouped text --------- +      (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-red2) +      (list +        (concat +          "\\(\*\~\\)" +          "\\([^ \r\t\n]+\\)" +        ) +        '(1 general-font-lock-red1 t) +        '(2 general-font-lock-blue2 t) +      ) +      ;; 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) +        '(3 general-font-lock-red1 t) +      ) +      ;; bold ---------------- +      (list +        (concat +          "\\([!]\{\\)" +          "\\([^\}]+\\)" +          "\\(\}[!]\\)" +        ) +        '(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) +      ;; italics ------------- +      (list +        (concat +          "\\([/]\{\\)" +          "\\([^\}]+\\)" +          "\\(\}[/]\\)" +        ) +        '(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) +        '(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) +        '(3 general-font-lock-red1 t) +      ) +      ;; inserted text ------- +      (list +        (concat +          "\\([\+]\{\\)" +          "\\([^\}]+\\)" +          "\\(\}[\+]\\)" +        ) +        '(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) +        '(3 general-font-lock-red1 t) +      ) +      ;; superscript --------- +      (list +        (concat +          "\\(\\^\{\\)" +          "\\([^\}]+\\)" +          "\\(\}\\^\\)" +        ) +        '(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) +        '(3 general-font-lock-red1 t) +      ) +      ;; numbered list +      (cons "^# \\|^_# "                'general-font-lock-red1) +      ;; bullet text +      (cons "^_\\*[1-9] \\|^_\\* "      'general-font-lock-red1) +      ;; indented text +      (cons "^_[1-9] "                  'general-font-lock-red1) +      (cons "^_[1-9]! "                 'general-font-lock-red1) +      ;; hanging indented text [proposed enable when implemented]        (cons "^__[1-9] "                'general-font-lock-red1)        (cons "^_[0-9]_[0-9] "           'general-font-lock-red1)        (cons "^__[1-9]! "               'general-font-lock-red1)        (cons "^_[0-9]_[0-9]! "          'general-font-lock-red1) - -     ;;url -     (cons "\\(^\\|[ ]\\)http:[/][/][^ \t\n\r<]+" 'general-font-lock-blue2) - -     ;; Comment Lines -     (cons "^% .*"                     'general-font-lock-blue1) - -     ;; line break -     (cons " \\\\\\\\ "                    'general-font-lock-red1) -     ;; line break (depreciated) -     (cons "<br>"                      'general-font-lock-red1) - -     ;; Section titles -     (list "^\\(\\([1-8]\\|:?[A-C]\\)\\~\\)\\(.*\\)" -     '(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) -     '(3 general-font-lock-blue2 t)) - -     ;; book index -     (cons "^\=\{.+\}"                 'general-font-lock-green1) - -     ;; numbers -     (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) -           '(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) -           '(3 general-font-lock-blue2 t)) - -     ;; raw keywords -     (list (concat -      "^\\(\\@\\(" -      "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.") - -;;}}} - -;;{{{ Sisu & Autoload: - -;;###autoload +      ;; url +      (cons "\\(^\\|[ ]\\)http:[/][/][^ \t\n\r<]+" 'general-font-lock-blue2) +      ;; Comment Lines +      (cons "^% .*"                     'general-font-lock-blue1) +      ;; line break +      (cons " \\\\\\\\ "                    'general-font-lock-red1) +      ;; line break (depreciated) +      (cons "<br>"                      'general-font-lock-red1) +      ;; Section titles +      (list "^\\(\\([1-8]\\|:?[A-C]\\)\\~\\)\\(.*\\)" +        '(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) +        '(3 general-font-lock-blue2 t) +      ) +      ;; book index +      (cons "^\=\{.+\}"                 'general-font-lock-green1) +      ;; numbers +      (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) +        '(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) +        '(3 general-font-lock-blue2 t) +      ) +      ;; raw keywords +      (list +        (concat +          "^\\(\\@\\(" +          "creator\\|" +          "title\\|" +          "date\\|" +          "rights\\|" +          "publisher\\|" +          "classify\\|" +          "identifier\\|" +          "original\\|" +          "notes\\|" +          "links\\|" +          "make\\|" +          "\\):\\)\\(.*\\)" +        ) +        '(1 sisu-title-2 keep) +        '(3 sisu-title-3 keep) +      ) +    ) +  ) +  "Default expressions to highlight in AsciiSisu mode." +) +;; Sisu & Autoload: +;; ##autoload  (define-derived-mode sisu-mode text-mode "SiSU"    "Major mode for editing SiSU files."    (interactive)    (modify-syntax-entry ?\'  ".")    ;(flyspell-mode nil) -    (make-local-variable 'paragraph-start)    (setq paragraph-start (concat "$\\|>" page-delimiter))    (make-local-variable 'paragraph-separate)    (setq paragraph-separate paragraph-start)    (make-local-variable 'paragraph-ignore-fill-prefix)    (setq paragraph-ignore-fill-prefix t) -    (make-local-variable 'require-final-newline)    (setq require-final-newline t) -    (make-local-variable 'font-lock-defaults)    (setq font-lock-defaults    '(sisu-font-lock-keywords @@ -359,10 +351,7 @@      nil        ; CASE-FOLD: no      ((?_ . "w"))      ; SYNTAX-ALIST      )) -  (run-hooks 'sisu-mode-hook)) - +  (run-hooks 'sisu-mode-hook) +)  (provide 'sisu-mode) - -;;}}} - -;;; sisu-mode.el ends here +;; sisu-mode.el ends here | 
