From: Andrey Listopadov <andreyorst@gmail.com>
To: john muhl <jm@pub.pink>
Cc: 66159@debbugs.gnu.org
Subject: bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159)
Date: Sun, 08 Oct 2023 12:43:50 +0300 [thread overview]
Message-ID: <87r0m5qw2n.fsf@gmail.com> (raw)
In-Reply-To: <87edi6xpvn.fsf@pub.pink>
john muhl <jm@pub.pink> writes:
>> It seems the last patch broke the movement.
>
> The tests for those pass and are still working here. Maybe you found
> another case that needs to be improved. What is the specific problem?
It seems so, sorry for not including this, I thought I sent this before.
Here's an example:
█for i=1,10 do
print(x)
end
Pressing Pressing C-M-f (forward-sexp) puts the point here:
for i=1,10 do
print(x)█
end
I think it should go over the `for' loop right to the `end'.
Pressing Pressing C-M-b (backward-sexp), however, puts the point here:
for i=1,10 do
█print(x)
end
Pressing C-M-b again doesn't move the point anymore.
Same thing happens with for-each style loop:
█for k,v in pairs({1,2,3}) do
print(x)
end
C-M-f:
for k,v in pairs({1,2,3})█do
print(x)
end
C-M-f:
for k,v in pairs({1,2,3}) do
print(x)█
end
Backward movement manages to take the point way back to the pairs:
C-M-b, C-M-b:
for k,v in pairs█({1,2,3}) do
print(x)
end
I went to https://devhints.io/lua and copied a bunch of examples of
other loops to the scratch buffer, and the movement is as follows:
█while condition do
end
for i = 1,5 do
end
for i = start,finish,delta do
end
for k,v in pairs(tab) do
end
repeat
until condition
-- Breaking out:
while x do
if condition then break end
end
C-M-f:
while condition do
end
for i = 1,5 do
end
for i = start,finish,delta do
end
for k,v in pairs(tab)█do
end
repeat
until condition
-- Breaking out:
while x do
if condition then break end
end
C-M-f:
while condition do
end
for i = 1,5 do
end
for i = start,finish,delta do
end
for k,v in pairs(tab) do
end
repeat
until condition
-- Breaking out:
while x do
if condition then break end█
end
--
Andrey Listopadov
next prev parent reply other threads:[~2023-10-08 9:43 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 19:17 bug#66159: 30.0.50; lua-ts-mode semantic indentation problems Andrey Listopadov
2023-09-22 19:49 ` Eli Zaretskii
2023-09-24 15:06 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-24 15:44 ` Eli Zaretskii
2023-09-24 16:38 ` Andrey Listopadov
2023-09-24 18:20 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-26 19:21 ` Andrey Listopadov
2023-09-27 1:18 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-30 9:59 ` Andrey Listopadov
2023-09-30 13:57 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-03 15:04 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-03 19:13 ` Andrey Listopadov
2023-09-30 7:52 ` Philip Kaludercic
2023-10-06 19:44 ` bug#66159: [PATCH] Various improvements to lua-ts-mode (Bug#66159) john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-07 10:11 ` Mauro Aranda
2023-10-07 16:15 ` Andrey Listopadov
2023-10-07 18:10 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-08 9:43 ` Andrey Listopadov [this message]
2023-10-09 3:28 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-17 3:26 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-20 20:40 ` Stefan Kangas
2023-10-22 20:03 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-10-23 8:11 ` Stefan Kangas
2023-10-21 5:15 ` Andrey
2023-10-21 11:37 ` Andrey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0m5qw2n.fsf@gmail.com \
--to=andreyorst@gmail.com \
--cc=66159@debbugs.gnu.org \
--cc=jm@pub.pink \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).