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

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

[debbugs-tracker] bug#20617: closed (23.4; sh-script.el indentation for


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#20617: closed (23.4; sh-script.el indentation for "main" function)
Date: Wed, 20 May 2015 16:55:03 +0000

Your message dated Wed, 20 May 2015 12:54:38 -0400
with message-id <address@hidden>
and subject line Re: bug#20617: 23.4; sh-script.el indentation for "main" 
function
has caused the debbugs.gnu.org bug report #20617,
regarding 23.4; sh-script.el indentation for "main" function
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
20617: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20617
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 23.4; sh-script.el indentation for "main" function Date: Wed, 20 May 2015 16:35:53 +0000 (UTC)
  When indenting sh script in "Shell-script" mode, I have this very strange behaviour with the funtion named 'main'
  It indent on more time the line in the function AND the line after the function!

example:
---------------------------
1: main( ) {
2:    echo "usage: $1"
3:    exit 0
4:    }
5:   
6:    main $*
---------------------------
(for lines 2 and 3 I have one Tab, for lines 4 to 6, I have 4 spaces)


It does not do the same with an other function name of 4 letters.
---------------------------
 #!/bin/sh

toto( ) {
    echo "usage: $1"
    exit 0
}

toto $*
---------------------------
 
And if I add a parameter, the behaviour changes back to normal...
---------------------------
#!/bin/sh

main( nil ) {
    echo "usage: $1"
    exit 0
}

main $*
---------------------------
 
But could not find a specific processing of the 'main' function.

Longue Vie au Gnou!




--- End Message ---
--- Begin Message --- Subject: Re: bug#20617: 23.4; sh-script.el indentation for "main" function Date: Wed, 20 May 2015 12:54:38 -0400 User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
Version: 24.1

Thibaut wrote:

>   When indenting sh script in "Shell-script" mode, I have this very
> strange behaviour with the funtion named 'main'
>   It indent on more time the line in the function AND the line after
> the function!
>
> example:---------------------------1: main( ) {
> 2:    echo "usage: $1"3:    exit 0
> 4:    }
> 5:    
> 6:    main $*
> ---------------------------(for lines 2 and 3 I have one Tab, for lines 4 to 
> 6, I have 4 spaces)


Thanks for the report.
By experiment, this was fixed in Emacs 24.1.
Please upgrade (current is 24.5).


--- End Message ---

reply via email to

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