GNU bug report logs -
#20617
23.4; sh-script.el indentation for "main" function
Previous Next
Reported by: Thibaut <madtibo <at> yahoo.co.uk>
Date: Wed, 20 May 2015 16:47:02 UTC
Severity: normal
Found in version 23.4
Fixed in version 24.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20617 in the body.
You can then email your comments to 20617 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#20617
; Package
emacs
.
(Wed, 20 May 2015 16:47:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Thibaut <madtibo <at> yahoo.co.uk>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 20 May 2015 16:47:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 $*
---------------------------
I looked in the file: http://repo.or.cz/w/emacs.git/blob/HEAD:/lisp/progmodes/sh-script.elBut could not find a specific processing of the 'main' function.
Longue Vie au Gnou!
[Message part 2 (text/html, inline)]
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Wed, 20 May 2015 16:55:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Thibaut <madtibo <at> yahoo.co.uk>
:
bug acknowledged by developer.
(Wed, 20 May 2015 16:55:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 20617-done <at> debbugs.gnu.org (full text, mbox):
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).
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 18 Jun 2015 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 82 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.