[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (case x in y)z;;easc) indentation
From: |
Stefan Monnier |
Subject: |
Re: (case x in y)z;;easc) indentation |
Date: |
Fri, 15 Jun 2007 17:18:37 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
> #!/bin/sh
> (
> case $x in
> y)echo z;;
> esac
> ) ##starting here we see shell-script mode has been seduced by
> mv a b ##voluptuous curves of the above "y)". The one-second duration
> ##matching parens flasher gets it right, but not the TAB indenter.
Oops, indeed. Damn /bin/sh! This is difficult to fix. In the meantime,
you can use "esac;".
> Also, putting an extra "in" here:
> y)echo z in;;
> glows blue just like it was the real "in" at the start of the case.
Yes, put it inside quotes. Otherwise code such as
echo $z in
ps | head
)
will also get the ) incorrectly marked as belonging to a case-pattern
(because the algorithm only looks back until the `in' not until the `case').
Again, this is difficult to fix.
> Also, need a space if want to get these brackets nice:
> {
> a
> }>b
> {
> a
> } >b
This one should be easier to fix.
In any case, please don't wait for me to fix those bugs. I may get around
to do it eventually, but that can be pretty damn far in the future.
Stefan