[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66466: [PATCH] Support lua-ts-mode in align.el
From: |
Stefan Kangas |
Subject: |
bug#66466: [PATCH] Support lua-ts-mode in align.el |
Date: |
Thu, 12 Oct 2023 07:35:36 +0000 |
john muhl via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs@gnu.org> 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
> "="
> (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-*\\)=\\(\\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'?