- Subject: Re: shell-mode with indentation
- From: Martin Klaiber <martinkl@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 6 Mar 2009 00:34:01 +0100
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]