From 804502e6191371eaa080d731b73b2bf25331fed0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 29 Dec 2015 12:18:17 -0500 Subject: sisu-mode.el, tic block markup, and minor arrangement * moves outline-regexp * adjustment to autoload list --- data/doc/sisu/CHANGELOG_v7 | 3 +- .../sisu/conf/editor-syntax-etc/emacs/sisu-mode.el | 73 +++++++--------------- 2 files changed, 25 insertions(+), 51 deletions(-) (limited to 'data') diff --git a/data/doc/sisu/CHANGELOG_v7 b/data/doc/sisu/CHANGELOG_v7 index e2941211..c9caa971 100644 --- a/data/doc/sisu/CHANGELOG_v7 +++ b/data/doc/sisu/CHANGELOG_v7 @@ -25,6 +25,7 @@ Reverse Chronological: * emacs sisu-mode.el * apply patch from Kevin Ryde of 2015-12-18 + * tic block markup, and minor arrangement * sisu_7.1.6.orig.tar.xz (2015-12-15:50/2) http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=log;h=refs/tags/sisu_7.1.6 @@ -32,7 +33,7 @@ Reverse Chronological: * emacs sisu-mode.el & sisu-mode-autoloads.el: * sisu-mode.el, minor update and modify format to reduce diff with FSF version, and match tic style markup blocks ``` - (revisit tic block markup, improperly impmented) + (revisit tic block markup, improperly implemented) * sisu-mode-autoloads.el, added (see elpa 3.0.3 & Kevin Ryde recent post) * documentation related to search, needs further review 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 7dbdaa53..998a4231 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 . +;; 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,41 +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\\}\\)$" - ) - '(1 general-font-lock-red2 t) - '(2 nil t) - '(3 general-font-lock-red2 t) - ) - (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\\}[ ]+code.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" ) '(1 general-font-lock-red2 t) '(2 nil t) @@ -194,9 +170,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\\}\\)$" + "^\`\\{3\\}[ ]+table.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" ) '(1 general-font-lock-red2 t) '(2 nil t) @@ -204,9 +180,9 @@ ) (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) @@ -490,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,7 +480,7 @@ (setq paragraph-ignore-fill-prefix t) (set (make-local-variable 'outline-regexp) - "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\|\\@[a-z]+:\\( \\|$\\)\\)") + "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\|\\@[a-z]+:\\( \\|$\\)\\)") (make-local-variable 'require-final-newline) (setq require-final-newline t) @@ -519,11 +494,9 @@ )) (run-hooks 'sisu-mode-hook)) -;;;###autoload +;; ##autoload (add-to-list 'auto-mode-alist '("\\.sst\\'" . sisu-mode)) -;;;###autoload (add-to-list 'auto-mode-alist '("\\.ssm\\'" . sisu-mode)) -;;;###autoload (add-to-list 'auto-mode-alist '("\\.ssi\\'" . sisu-mode)) ;;;; ChangeLog: -- cgit v1.2.3