From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: kixtart-mode Date: Wed, 09 Nov 2022 17:04:17 -0500 Message-ID: References: <631d-636c1380-131-1f4ad1e0@218117756> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27537"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: morgan@ice9.digital Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Nov 09 23:05:19 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ostCB-0006vT-5K for ged-emacs-devel@m.gmane-mx.org; Wed, 09 Nov 2022 23:05:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ostBT-0008NK-6U; Wed, 09 Nov 2022 17:04:35 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ostBM-0008MI-6y for emacs-devel@gnu.org; Wed, 09 Nov 2022 17:04:33 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ostBG-0001xb-OB for emacs-devel@gnu.org; Wed, 09 Nov 2022 17:04:27 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 363CF80796; Wed, 9 Nov 2022 17:04:21 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5875F805B4; Wed, 9 Nov 2022 17:04:19 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1668031459; bh=UqMY8NCH1akE2DIctb5WwTDnPozQ/dCup1IPqMwTTvE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=bsVh/oCx8ji+Uic/Q3nUelhZG7hzTzq/LcbA3KZJewwtSzT2yjVwdqbnuPZtdYPW4 l3TR4wq/bD5fO6BzUO/FxACcVwwQQd5WYlYPQGcSdRXjFPsYCqa+xC7rEglLfEkHnW vLA3li9tY53YG30KPQociHQQAFBoi2UFSSm+0f/J8fj1ZwrzFXsUfvXBhtc+tYemCD z2lrtMsMNfEYHdXW2dZXWuL9CnWK8G04Z/t9CaJf9oCQNdYZpxWgw9ZbVv8X+z29BN ckcac9dOaysOcsEgEHm0wl7CEBmaKW/q6koe9p8Bv9K9OxpyVI781pH0smLFLv7t02 eKjrDW0NFJlCQ== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id ED0A0120A4F; Wed, 9 Nov 2022 17:04:18 -0500 (EST) In-Reply-To: <631d-636c1380-131-1f4ad1e0@218117756> (morgan@ice9.digital's message of "Wed, 09 Nov 2022 21:55:27 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299441 Archived-At: Hi Morgan, > I'd like to submit language support for KiXtart as a GNU ELPA package > (patch is attached). Thanks, looks good. Find below my sig a suggested patch to fix a few minor issues I found along the way (the main one is arguably the way `kixtart-tempo-tags` is passed to `tempo-define-template`). > There is a slight complication in that there is an old kixtart-mode > package on MELPA which just provided some font locking. I do have > permission from the author of this previous package to take over the > package name, effectively replacing the MELPA package with the new GNU > ELPA package. See confirmation from the author of the previous package > here: https://github.com/ryrun/kixtart-mode/issues/2 Looks fine from here. > I have gone through the FSF copyright assignment process and received > confirmation that it was successfully completed. The only issue on my side is that your name doesn't yet appear in the `copyright.list` file I can get from the FSF. Sometimes the FSF clerk forgets to update the file on the server, so it's nothing to worry about (and sometimes it's a mismatch in the names I use which make my searches fail). > Would there be any issues in adding the package? There is one issue, yes: is KiXtart Free Software? According to Wikipedia, the license is "Closed source Careware". And indeed, I can't find any source code on http://www.kixtart.org/. If that's indeed proprietary code, then I think we probably wouldn't want to host `kixtart-mode` on (Non)GNU ELPA. Stefan diff --git a/kixtart-mode.el b/kixtart-mode.el index 0cb8b9edc4..72b7dc6724 100644 --- a/kixtart-mode.el +++ b/kixtart-mode.el @@ -848,7 +848,7 @@ removed when template insertion is interactive." (remove 'p template) template)))) -(defconst kixtart-tempo-tags nil +(defvar kixtart-tempo-tags nil "Tempo tags for KiXtart Mode.") (define-abbrev-table 'kixtart-mode-abbrev-table nil @@ -863,18 +863,17 @@ TAG, DOCUMENTATION, and ELEMENTS are passed directly to `tempo-define-template'. TAG is also used as the abbrev string which will be expanded to the template." (declare (indent 2)) - (let ((template (gensym))) - `(let ((,template (tempo-define-template (concat "kixtart-" ,tag) - (quote ,@elements) - ,tag - ,documentation - kixtart-tempo-tags))) - (define-abbrev kixtart-mode-abbrev-table ,tag "" (identity ,template) + (let ((funname (intern (concat "kixtart-template-" tag)))) + `(progn + (defalias ',funname + (tempo-define-template (concat "kixtart-" ,tag) + (quote ,@elements) + ,tag + ,documentation + 'kixtart-tempo-tags)) + (define-abbrev kixtart-mode-abbrev-table ,tag "" #',funname :system t) - (put (identity ,template) 'no-self-insert t) - (defalias (intern (concat "kixtart-template-" ,tag)) - (identity ,template) - ,documentation)))) + (put ',funname 'no-self-insert t)))) (kixtart--define-template "while" @@ -962,16 +961,16 @@ which will be expanded to the template." (define-key map (kbd "C-c C-t C-b") #'tempo-backward-mark) (define-key map (kbd "C-c C-t C-f") #'tempo-forward-mark) (define-key map (kbd "C-c C-t C-t") #'tempo-complete-tag) - (define-key map (kbd "C-c C-t I") 'kixtart-template-ifelse) - (define-key map (kbd "C-c C-t c") 'kixtart-template-case) - (define-key map (kbd "C-c C-t d") 'kixtart-template-do) - (define-key map (kbd "C-c C-t e") 'kixtart-template-foreach) - (define-key map (kbd "C-c C-t f") 'kixtart-template-for) - (define-key map (kbd "C-c C-t i") 'kixtart-template-if) - (define-key map (kbd "C-c C-t l") 'kixtart-template-else) - (define-key map (kbd "C-c C-t s") 'kixtart-template-select) - (define-key map (kbd "C-c C-t u") 'kixtart-template-function) - (define-key map (kbd "C-c C-t w") 'kixtart-template-while) + (define-key map (kbd "C-c C-t I") #'kixtart-template-ifelse) + (define-key map (kbd "C-c C-t c") #'kixtart-template-case) + (define-key map (kbd "C-c C-t d") #'kixtart-template-do) + (define-key map (kbd "C-c C-t e") #'kixtart-template-foreach) + (define-key map (kbd "C-c C-t f") #'kixtart-template-for) + (define-key map (kbd "C-c C-t i") #'kixtart-template-if) + (define-key map (kbd "C-c C-t l") #'kixtart-template-else) + (define-key map (kbd "C-c C-t s") #'kixtart-template-select) + (define-key map (kbd "C-c C-t u") #'kixtart-template-function) + (define-key map (kbd "C-c C-t w") #'kixtart-template-while) (define-key map (kbd "C-c C-u") #'kixtart-up-script-block) map))