GNU bug report logs - #40076
26.3; [shell script mode/bash] Wrong indentation for extended pattern "case" switches

Previous Next

Package: emacs;

Reported by: Bruno Raoult <braoult <at> gmail.com>

Date: Sun, 15 Mar 2020 13:38:02 UTC

Severity: minor

Tags: confirmed

Found in versions 26.3, 28.0.50

Full log


Message #12 received at control <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Bruno Raoult <braoult <at> gmail.com>
Cc: 40076 <at> debbugs.gnu.org
Subject: Re: bug#40076: 26.3; [shell script mode/bash] Wrong indentation for
 extended pattern "case" switches
Date: Sun, 23 Aug 2020 08:34:14 -0400
severity 40076 minor
found 40076 28.0.50
tags 40076 + confirmed
thanks

Bruno Raoult <braoult <at> 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




This bug report was last modified 4 years and 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.