From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralph Amissah Newsgroups: gmane.emacs.devel Subject: Re: Ambrose Kofi Laing & Ralph Neelante Amissah [Emacs] sisu-mode.el - a major-mode for highlighting a structured text Date: Fri, 19 Feb 2016 01:18:02 -0500 Message-ID: <20160219061802.GA29619@niu> References: <20160218221933.GA32234@niu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="zhXaljGHf11kAtnf" X-Trace: ger.gmane.org 1455868051 6254 80.91.229.3 (19 Feb 2016 07:47:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Feb 2016 07:47:31 +0000 (UTC) Cc: Kevin Ryde , Ambrose Kofi Laing , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 19 08:47:19 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aWfmX-0005hJ-3g for ged-emacs-devel@m.gmane.org; Fri, 19 Feb 2016 08:47:17 +0100 Original-Received: from localhost ([::1]:49454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWfmW-0007nR-ET for ged-emacs-devel@m.gmane.org; Fri, 19 Feb 2016 02:47:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWeOI-0004Ab-Kt for emacs-devel@gnu.org; Fri, 19 Feb 2016 01:18:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWeOE-00043l-Mu for emacs-devel@gnu.org; Fri, 19 Feb 2016 01:18:10 -0500 Original-Received: from mail-qg0-x230.google.com ([2607:f8b0:400d:c04::230]:34597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWeOE-00043a-EA for emacs-devel@gnu.org; Fri, 19 Feb 2016 01:18:06 -0500 Original-Received: by mail-qg0-x230.google.com with SMTP id b67so54968219qgb.1 for ; Thu, 18 Feb 2016 22:18:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=tuN3G3w73y++eJ3aPhlQwGtVNDNQx6u6egJdE7143pU=; b=JxF+DFeN72Ta9Qt1zcNAfYtZZpelijQSDl843ZpnORy080CONTUrhItNuhC4dW8TEA YETze+kWWHccP+DH2ZW2Mk8iGpniZjK/qiZ0ZVvaMbLGuQZC5K1zrmCgBxnQr/iBqchr +XklfbRiwiaBUXZXv6u/Y3FFKBDltW2Fr/I2Wo0+LG+kRbl3H3hGf3TqLxV91NMrMNyr fET12FsFjpJCm2iAU7RcbCdAMm99huDMz8qLuN206yUJmZjORB45fOuuAOXo8y2BHYnZ BgxIyEJus8DlVKvYXGrW+RGbzX5v5Hb5mUENu/m7qMG8vkBPrmneNyzIQFWaL3K5AlR8 GbUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=tuN3G3w73y++eJ3aPhlQwGtVNDNQx6u6egJdE7143pU=; b=lRDlIplgjd9YVRb9K1u6Tr723h3kmJA2+UBwMp3FHGOTYZuQGtCSLzgUVeDdD1NQqH j81n/bgQL/UM66yIiWhDn00tm/lXEppTCefhuPwi0foIPkBoMFehKS2qyvPocuEIC63g wV3mkYa57t9w9lVPoZgzx1I/t9MgfLheq4mnR+zHJ8dSoZL0kCtLTJqwHjMqfCtA0ePQ fHPkXk9k3zj+zgrfF747z0YuV4qFIBDp1iQZ+lADdfusrYlWl06JpVfjgYPRzuJljK3B Rjl9TRxh8MwUTqs9TYTODovedKMHBl7IofabrmeXoKsIwKKUhMKIklU9sLm1ttDgqfkg OBoQ== X-Gm-Message-State: AG10YOSmB2tOtwxc6NW9HF9x0GfKDKiX+DpANsjACKX1VUwkJIkTcAggU3ofTRby1PDezw== X-Received: by 10.140.102.14 with SMTP id v14mr13410535qge.48.1455862686050; Thu, 18 Feb 2016 22:18:06 -0800 (PST) Original-Received: from niu (pool-72-79-53-224.nwrknj.east.verizon.net. [72.79.53.224]) by smtp.gmail.com with ESMTPSA id n35sm522192qgn.10.2016.02.18.22.18.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Feb 2016 22:18:04 -0800 (PST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c04::230 X-Mailman-Approved-At: Fri, 19 Feb 2016 02:46:52 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200184 Archived-At: --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Feb 18, 2016 at 10:59:53PM -0500, Stefan Monnier wrote: > > I do not know whether you are still the correct person to address this > > email to, but it is easiest to continue the trail where we last left > > off. > > Yes, this address still works. > > > I hope this note finds you in good health. > > Fine, thank you very much. > Am glad for all of the above :) > > Please find attached sisu-mode.el and sisu-mode-autoloads.el updated to > > for current sisu markup, and with corrections with regard to autoload > > (re: the relevant filenames). > > Please send us a patch against the current code in > git://git.savannah.gnu.org/emacs/elpa.git. Please find attached sisu-mode.diff for sisu-mode.el > Note that sisu-mode-autoloads.el is not there, because it's auto-generated. I apologise for my ignorance, how does the auto-generation of sisu-mode-autoloads.el work, as I have done nothing to take this into account. sisu markup is applied to files with the suffix .sst (regular sisu files) .ssm (a master file that is made up of inserts (if used)) .ssi (insert files if used that are not to be processed regularly). (recognised say in vim since 2006, in emacs the result of the auto-generation appears to autoload against files with a .sisu suffix). So I attach sisu-mode-autoloads.el again, for how I hope it to look. (If sisu-mode-autoloads.el is controlled in some way in sisu-mode.el I will need to send it again). > > Stefan Thanks, Ralph http://www.sisudoc.org/ http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=summary --zhXaljGHf11kAtnf Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="sisu-mode.diff" --- sisu-mode.el 2016-02-19 00:37:21.798481323 -0500 +++ sisu-mode-7.1.7.el 2016-02-19 00:41:27.824326557 -0500 @@ -1,10 +1,19 @@ -;;; sisu-mode.el --- Major mode for SiSU markup text +;;; sisu-mode.el --- a major-mode for highlighting a hierarchy structured text. -;; Copyright (C) 2011 Free Software Foundation, Inc. +;; Copyright (C): Free Software Foundation, Inc. (FSF) (GNU EMACS) +;; Assigned to FSF 2011-04-08 +;; +;; [this file has been edited and updated by Ralph Amissah] -;; Author: Ambrose Kofi Laing (& Ralph Amissah) -;; Keywords: text, processes, tools -;; Version: 3.0.3 +;; Author: Ralph Amissah & Ambrose Kofi Laing +;; Keywords: text, syntax, processes, tools +;; 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 +;; URL: [http://git.sisudoc.org/gitweb/?p=code/sisu.git;a=blob;f=data/sisu/conf/editor-syntax-etc/emacs/sisu-mode.el;hb=HEAD] ;; License: GPLv3 ;; Home URL: SiSU: http://www.jus.uio.no/sisu ;; originally looked at (based on) doc-mode, with kind permission of the author @@ -23,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! @@ -43,10 +52,6 @@ ;; The documentation for the "Structure Of The Hierarchy Text" can be ;; found in the sisustring for the sisu-mode function. -;;; Code: - -;;{{{ Variables: - (defgroup sisu-faces nil "AsciiSisu highlighting" :group 'sisus) @@ -136,210 +141,334 @@ (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) + (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) + + (list + (concat + "^\`\\{3\\}[ ]+code.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" + ) + '(1 general-font-lock-red2 t) + '(2 nil t) + '(3 general-font-lock-red2 t) + ) + (list + (concat + "^\`\\{3\\}[ ]+table.*?$" + "\\(.\\|\n\\)+?" + "\`\\{3\\}$" + ) + '(1 general-font-lock-red2 t) + '(2 nil t) + '(3 general-font-lock-red2 t) + ) + (list + (concat + "^\`\\{3\\}[ ]+\\(group\\|block\\|alt\\|poem\\)$" + "\\(.\\|\n\\)+?" + "^\`\\{3\\}$" + ) + '(1 general-font-lock-red2 t) + '(2 nil t) + '(3 general-font-lock-red2 t) + ) + + ;; 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) + + ;; page break + (cons "^\\(-\\\\\\\\-\\|=\\\\\\\\=\\|-\\.\\.-\\)" 'general-font-lock-red2) + + ;; line break + (cons " \\\\\\\\ " 'general-font-lock-red1) + + ;; line break (depreciated) + (cons "
" 'general-font-lock-red1) + + ;; Section titles + (list "^\\(\\([1-4]\\|:?[A-D]\\)\\~\\)\\(.*\\)" + '(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 + (list + (concat + "^\\(\=\{\\)" + "\\([^\}\{]+\\)" + "\\(}\\)$" + ) + '(1 general-font-lock-green1 t) + '(2 nil t) + '(3 general-font-lock-green1 t) + ) + + ;(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." +) + +;; enables outlining for sisu +(add-hook 'sisu-mode-hook + '(lambda () + (outline-minor-mode))) + +;;; outline mode "folding" if available +;;; TODO make sure linum (line numbering) is off, else performance penalty, sucks bigtime +;(define-key evil-normal-state-map (kbd ",0") (lambda() (interactive) (show-all))) +;(define-key evil-normal-state-map (kbd ",-") (lambda() (interactive) (hide-body))) +;(define-key evil-normal-state-map (kbd ",+") (lambda() (interactive) (show-subtree))) +;(define-key evil-normal-state-map (kbd ",=") (lambda() (interactive) (show-subtree))) +; +;;(define-key evil-normal-state-map ",0" 'show-all) +;;(define-key evil-normal-state-map ",-" 'hide-body) +;;(define-key evil-normal-state-map ",+" 'show-subtree) +;;(define-key evil-normal-state-map ",=" 'show-subtree) + +;; C-c @ C-a show all +;; C-c @ C-t show only the headings +;; C-c @ C-s show subtree at cursor location +;; C-c @ C-d hide subtree at cursor location - ;;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) - - ;;url - (cons "\\(^\\|[ ]\\)http:[/][/][^ \t\n\r<]+" 'general-font-lock-blue2) - -;; \\|\$ - - ;; Comment Lines - (cons "^% .*" 'general-font-lock-blue1) - ;; line break - (cons "
" '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 +;; Sisu & Autoload: (define-derived-mode sisu-mode text-mode "SiSU" - "Major mode for editing SiSU files. -SiSU (http://www.sisudoc.org/) is a document structuring and -publishing framework. This major mode handles SiSU markup." + "Major mode for editing SiSU files." + (interactive) (modify-syntax-entry ?\' ".") ;(flyspell-mode nil) @@ -350,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) @@ -362,10 +494,29 @@ )) (run-hooks 'sisu-mode-hook)) -;;;###autoload (add-to-list 'auto-mode-alist '("\\.sisu\\'" . 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)) -(provide 'sisu-mode) +;;;; ChangeLog: -;;}}} +;; 2011-07-12 Chong Yidong +;; +;; Fix version numbers of sisu-mode, register-list, and windresize. +;; +;; 2011-07-08 Chong Yidong +;; +;; sisu-mode.el: Add .sisu to auto-mode-alist using autoload cookie. +;; Minor doc fixes. +;; +;; 2011-07-06 Stefan Monnier +;; +;; * sisu-mode.el (sisu-mode): Autoload. +;; +;; 2011-07-04 Stefan Monnier +;; +;; Add sisu-mode.el. Update all.el licence. +;; -;;; sisu-mode.el ends here +(provide 'sisu-mode) --zhXaljGHf11kAtnf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sisu-mode-autoloads.el" (add-to-list 'load-path (or (file-name-directory #$) (car load-path))) (autoload 'sisu-mode "sisu-mode" "\ Major mode for editing SiSU markup files. SiSU (http://www.sisudoc.org/) document structuring, publishing and search. \(fn)" t nil) (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)) --zhXaljGHf11kAtnf--