[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Korn Shell Script Strangeness

From: Kai Grossjohann
Subject: Re: Korn Shell Script Strangeness
Date: Sun, 22 Feb 2004 18:04:36 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux)

address@hidden (Tennis Smith) writes:

> So, I'm wondering how to make that happen.  The "ed" code is the only
> thing in the whole file that simply won't indent when I do an
> "indent-region".  How can I make this conform to some sort of uniform
> formatting?

Imagine you do

    cat > /tmp/foo <<EOF

The cat line is indented because of a surrounding if, or something.
Further imagine you reindent and then Emacs changes this to

    cat > /tmp/foo <<EOF

Then you'll see two things happening.  The first is that the file
contents of /tmp/foo have suddenly changed -- it contains eight spaces
more than it used to.

Secondly, it might happen that the shell script doesn't run at all
because the shell is looking for "EOF" at the beginning of a line.
But I'm not sure about this, and I'm too lazy to check at the moment.

I'm happy that Emacs does not indent the here documents.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]