From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66466: [PATCH] Support lua-ts-mode in align.el Date: Thu, 12 Oct 2023 22:13:56 -0500 Message-ID: <8734yfruj6.fsf@pub.pink> References: <87bkd5oyoj.fsf@pub.pink> Reply-To: john muhl Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32050"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66466@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 13 06:56:00 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qrADQ-00088T-Ca for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Oct 2023 06:56:00 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrAD7-0005ro-7p; Fri, 13 Oct 2023 00:55:41 -0400 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 1qrAD5-0005rf-BU for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2023 00:55:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrAD5-0004ei-3D for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2023 00:55:39 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrADR-0001wV-IJ for bug-gnu-emacs@gnu.org; Fri, 13 Oct 2023 00:56:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Oct 2023 04:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66466 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 66466-submit@debbugs.gnu.org id=B66466.16971729487446 (code B ref 66466); Fri, 13 Oct 2023 04:56:01 +0000 Original-Received: (at 66466) by debbugs.gnu.org; 13 Oct 2023 04:55:48 +0000 Original-Received: from localhost ([127.0.0.1]:44595 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrADD-0001w1-GR for submit@debbugs.gnu.org; Fri, 13 Oct 2023 00:55:47 -0400 Original-Received: from out-207.mta1.migadu.com ([95.215.58.207]:15697) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrAD6-0001vj-Hr for 66466@debbugs.gnu.org; Fri, 13 Oct 2023 00:55:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; s=key1; t=1697172913; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WL8el/noiI43ZmxDmtB/vyDVJr3VOU2vRmZGEDrS+mU=; b=lRYH39webYu9VbFAc2YobBC8ZMCinDnmt3cEnZlff8VhguLIcVjrAS1e3s6rH0rosw/aX5 GxZAueX92tgwW2aAJ2xbY+QM8Z7bdCZ/ObbNdOUYZsHMBKCV3HVgONYGaNU4SW1ghX83Gr n8Co5u6LNsqT2tApI1mVRpuCVyybh+Q= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272332 Archived-At: Stefan Kangas writes: > john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text > editors" writes: > >> Add support for using align in Lua files. > > nThanks. > >> diff --git a/lisp/align.el b/lisp/align.el >> index a286addb51f..e6e62ce5726 100644 >> --- a/lisp/align.el >> +++ b/lisp/align.el >> @@ -577,7 +577,23 @@ align-rules-list >> "=3D" >> (group (zero-or-more (syntax whitespace))))) >> (group . (1 2)) >> - (modes . '(conf-toml-mode toml-ts-mode)))) >> + (modes . '(conf-toml-mode toml-ts-mode))) >> + >> + (lua-assignment >> + (regexp . ,(concat "\\(?:^\\(?:\\s-*\\(?:local\\s-+\\)?\\(?:[,<>= _]" >> + "\\|\\w\\)+\\)+\\(\\s-*\\)=3D\\(\\s-*\\)\\)")) >> + (group . (1 2)) >> + (modes . '(lua-ts-mode)) >> + (tab-stop . nil)) >> + >> + (lua-comment >> + (regexp . "\\(?:\\(\\s-*\\)--.*\\)") >> + (modes . '(lua-ts-mode)) >> + (column . comment-column) >> + (valid . ,(lambda () >> + (save-excursion >> + (goto-char (match-beginning 1)) >> + (not (bolp))))))) > > Should `lua-mode' also be in `modes'? lua-mode is only available from non-GNU ELPA so I wasn=E2=80=99t sure. If t= hat=E2=80=99s not a factor I=E2=80=99ll add it.