From: Stefan Kangas <stefankangas@gmail.com>
To: Visuwesh <visuweshm@gmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
55764@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#55764: 29.0.50; sh-mode: Support mksh's alternate case brace syntax
Date: Sat, 30 Sep 2023 19:30:53 -0700 [thread overview]
Message-ID: <CADwFkmm5p5uBE7gEEa6_esb-iCuicyLSjrdbMww-KmePGDH3Eg@mail.gmail.com> (raw)
In-Reply-To: <87k09zp3kh.fsf@gmail.com> (Visuwesh's message of "Thu, 02 Jun 2022 19:31:18 +0530")
Visuwesh <visuweshm@gmail.com> writes:
> [வியாழன் ஜூன் 02, 2022] Lars Ingebrigtsen wrote:
>
>> Visuwesh <visuweshm@gmail.com> writes:
>>
>>> mksh and OpenBSD's ksh support an alternative case syntax for historical
>>> reasons [1],
>>>
>>> case $i {
>>> *pattern) do ;;
>>> *pattern2) do2 ;;
>>> }
>>>
>>> Currently, sh-mode cannot handle this and the easy way out of writing a
>>> semicolon after $i is out since,
>>>
>>> % case "foo"; { *o) echo 1;; }
>>> /bin/mksh: syntax error: unexpected ';'
>>>
>>> I came with the attached patch after a bit of trial and error but I'm
>>> not sure if it is the right way to do it.
>>
>> I think that might make sense, but perhaps Stefan has some comments here
>> (added to the CCs).
>
> To no one's surprise, the patch is not the right approach. IIUC, when I
> use braces, *pattern) thingies are not recognised as "case-)" anymore so
> sh-indent-for-case-label does not get applied. I tried a bit more but I
> only got it to respect the first line but still it is definitely not the
> right approach,
Did you make any further progress here?
next prev parent reply other threads:[~2023-10-01 2:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 13:33 bug#55764: 29.0.50; sh-mode: Support mksh's alternate case brace syntax Visuwesh
2022-06-02 13:40 ` Lars Ingebrigtsen
2022-06-02 14:01 ` Visuwesh
2023-10-01 2:30 ` Stefan Kangas [this message]
2023-10-01 3:37 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-10 22:24 ` Stefan Kangas
2024-01-12 3:13 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=CADwFkmm5p5uBE7gEEa6_esb-iCuicyLSjrdbMww-KmePGDH3Eg@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=55764@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@iro.umontreal.ca \
--cc=visuweshm@gmail.com \
/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).