Subject: Re: bug#60833: [PATCH] sh-script.el: Add support for Zsh's case branches ; |.

From: Eli Zaretskii <[email-masked]>
Date: Sat, 21 Jan 2023 09:33:12 +0200

> From: Philippe Altherr <[email-masked]>
> Date: Sun, 15 Jan 2023 14:28:08 +0100
> 
> In shell scripts, case branches traditionally end with ;;. Bash additionally supports case branches ending with
> ;& and ;;&. Zsh similarly supports case branches ending with ;& and ;|. Currently sh-script.el supports case
> branches ending with ;;, ;&, and ;;&, but not with ;|. The attached patch adds support for case branches
> ending with ;|.
> 
> I have tested the patch by defining all the modified functions (sh-smie-sh-rules, sh-font-lock-paren) and
> constants (sh-smie-sh-grammar, sh-smie-rc-grammar, sh-smie--sh-operators, sh-smie--sh-operators-re,
> sh-smie--sh-operators-back-re) in my .emacs (in a (with-eval-after-load 'sh-script ...) statement).
> 
> Here is an example indented without the patch:
> 
> case $input in
>     *a* ) echo A;;
>     *b* ) echo B;&
>     *c* ) echo C;;&
>     *d* ) echo D;|
> *e* ) echo E;;
> esac
> 
> and with the (simulated) patch:
> 
> case $input in
>     *a* ) echo A;;
>     *b* ) echo B;&
>     *c* ) echo C;;&
>     *d* ) echo D;|
>     *e* ) echo E;;
> esac

Thanks.  First, would it be possible to add tests for these
situations?

And second, your contributions (this and the other one) are larger
than we can accept without your assigning the copyright to the FSF.
Would you like to start your legal paperwork at this time, so that we
could accept the changes after it is completed?  If so, I will send
you the form to fill.

Thanks again for your interest in Emacs.