* bug#20617: 23.4; sh-script.el indentation for "main" function
@ 2015-05-20 16:35 Thibaut
2015-05-20 16:54 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Thibaut @ 2015-05-20 16:35 UTC (permalink / raw)
To: 20617
[-- Attachment #1: Type: text/plain, Size: 1029 bytes --]
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!
[-- Attachment #2: Type: text/html, Size: 3760 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#20617: 23.4; sh-script.el indentation for "main" function
2015-05-20 16:35 bug#20617: 23.4; sh-script.el indentation for "main" function Thibaut
@ 2015-05-20 16:54 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2015-05-20 16:54 UTC (permalink / raw)
To: 20617-done
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).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-20 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-20 16:35 bug#20617: 23.4; sh-script.el indentation for "main" function Thibaut
2015-05-20 16:54 ` Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.