bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#40076: 26.3; [shell script mode/bash] Wrong indentation for extended


From: Stefan Kangas
Subject: bug#40076: 26.3; [shell script mode/bash] Wrong indentation for extended pattern "case" switches
Date: Sun, 23 Aug 2020 08:34:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

severity 40076 minor
found 40076 28.0.50
tags 40076 + confirmed
thanks

Bruno Raoult <braoult@gmail.com> writes:

> I have an issue with indentation of "case" switches containing extended 
> patterns
> such as +(pattern-list). Same occurs with "emacs -Q".
>
> Below if an example of indentation I get:
> ========================================
> #!/bin/bash
> shopt -s extglob
>
> case $1 in
>     A)
>         echo indent OK. case 'A'
>         ;;
>     [a-z])
>         echo indent OK. Case '[a-z]'
>         ;;
>     +([1-9]))
>              echo indent NOK. Case '+([1-9])', extended pattern.
>              ;;
>              *)
>                  echo still NOK. Case '*', after extended pattern
>                  ;;
>              esac # still NOK
> ========================================

I can reproduce this on current master starting from "emacs -Q".

Best regards,
Stefan Kangas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]