From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier 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 13:42:19 -0500 Message-ID: References: <20160218221933.GA32234@niu> <20160219061802.GA29619@niu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1455907365 27267 80.91.229.3 (19 Feb 2016 18:42:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Feb 2016 18:42:45 +0000 (UTC) Cc: Kevin Ryde , Ambrose Kofi Laing , emacs-devel@gnu.org To: Ralph Amissah Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 19 19:42:31 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 1aWq0c-0007BM-LK for ged-emacs-devel@m.gmane.org; Fri, 19 Feb 2016 19:42:30 +0100 Original-Received: from localhost ([::1]:54585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWq0c-0005yY-3P for ged-emacs-devel@m.gmane.org; Fri, 19 Feb 2016 13:42:30 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWq0Y-0005uw-9d for emacs-devel@gnu.org; Fri, 19 Feb 2016 13:42:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWq0T-00070Z-D9 for emacs-devel@gnu.org; Fri, 19 Feb 2016 13:42:26 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:40214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWq0T-00070J-6H for emacs-devel@gnu.org; Fri, 19 Feb 2016 13:42:21 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DgDQA731xV/+OhCkxcgxAjMV6CUMEVgTMdDoVtBAICgTw7EgEBAQEBAQGBCkEFg10BAQMBViMFCws0BwsUGA0kEwmIGwgNzxYBAQEBAQEEAQEBAQEdizqFAAUHgi0MQYEzBYwwhASBUUSEWId2g2uKK4N+ghSBRSOCChwVgVsgMQEBgkUBAQE X-IPAS-Result: A0DgDQA731xV/+OhCkxcgxAjMV6CUMEVgTMdDoVtBAICgTw7EgEBAQEBAQGBCkEFg10BAQMBViMFCws0BwsUGA0kEwmIGwgNzxYBAQEBAQEEAQEBAQEdizqFAAUHgi0MQYEzBYwwhASBUUSEWId2g2uKK4N+ghSBRSOCChwVgVsgMQEBgkUBAQE X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="193654093" Original-Received: from 76-10-161-227.dsl.teksavvy.com (HELO pastel.home) ([76.10.161.227]) by ironport2-out.teksavvy.com with ESMTP; 19 Feb 2016 13:42:20 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 710C7601E9; Fri, 19 Feb 2016 13:42:19 -0500 (EST) In-Reply-To: <20160219061802.GA29619@niu> (Ralph Amissah's message of "Fri, 19 Feb 2016 01:18:02 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:200234 Archived-At: > Please find attached sisu-mode.diff for sisu-mode.el Thanks. I was about to apply it, but I think it's not quite right. it's a bit hard to see what the patch does because it includes a lot of whitespace changes, but even after accounting for those, there are some changes which I don't think really want to install. See below. Stefan > -;;; sisu-mode.el --- Major mode for SiSU markup text > +;;; sisu-mode.el --- a major-mode for highlighting a hierarchy structured text. Why did you remove SiSU from the description? [ Not opposed to it, but rather curious. ] > -;; Copyright (C) 2011 Free Software Foundation, Inc. > +;; Copyright (C): Free Software Foundation, Inc. (FSF) (GNU EMACS) We want to keep all the years of publication in this line. > -;; 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, The Version: pseudo-header should be of the form AA.BB.CC.DD... only. > +;; 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] Better than a link to the file would be a link to some "sisu-mode project" web-page with further information than what's in this file. > ;; License: GPLv3 This is redundant. > + (cons "^group\{\\|^\}group" 'general-font-lock-red2) ^ ^ These two backslashes do not do anything. > +;; enables outlining for sisu > +(add-hook 'sisu-mode-hook > + '(lambda () > + (outline-minor-mode))) Please don't quote your lambdas. Also (lambda () (outline-minor-mode)) is just a round-about way to say #'outline-minor-mode. Finally, it's generally preferred to put such code directly in the sisu-mode function and leave the sisu-mode-hook nil by default. > +;(define-key evil-normal-state-map (kbd ",0") (lambda() (interactive) (show-all))) Single-semicolon comments are traditionally indented to comment-column (e.g. column 40 or so), so you should probably use ";;" instead here. > -;;;###autoload > +;; Sisu & Autoload: > (define-derived-mode sisu-mode text-mode "SiSU" This ";;;###autoload" comment is the magic cookie used to auto-generate sisu-mode-autoloads.el, so you don't want to remove it. > - "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) `define-derived-mode` already declares the function as interactive. > (run-hooks 'sisu-mode-hook)) And `define-derived-mode` also automatically runs sisu-mode-hook for you, so you don't need this either. > -;;;###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)) I think you want to use something like ;;;###autoload (add-to-list 'auto-mode-alist '("\\.ss[itm]\\'" . sisu-mode)) or ;;;###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)) > +;; 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. This gets auto-added (from the Git log) when generating the ELPA package, so we don't need it. Stefan