jed-users mailing list

[2009 Date Index] [2009 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: shell-mode with indentation


Dino Leonardo Sangoi <dino@xxxxxxxxxxxxxxxx> wrote:

> A lot of time ago (circa 2002), I wrote an extended version of
> shmode.sl, just to add indentation support.

> While the indentation algorithm is far from perfect, is does a good job
> on most cases. I use it and I don't remember having big problems with
> it, but as I wrote it, maybe is targeted at my coding style...

I gave it a first try and it worked really nice :-)

> As there are some known cases that makes the indentation misbehave, I
> just added a "backdoor" to restore the correct indentation. So, for
> example:

> --------
> echo "$BackupPatterns" | while read i ; do
>     ls -a "$1" | grep "$i" 2> /dev/null \
>        | while read line ; do
>           echo "$1/$line"
>        done
>     done # <-- Bad! Should be at 'echo "$BackupPatterns" | ...' level! 
>     IFS="$SaveIFS" #  <-- and the error propagates.
> --------

Ah, ok, no problem.  AFAICS this will only happen in rare cases.

So, thanks a lot for the code, Dino!

Martin

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2009 date index] [2009 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]