[Top][All Lists]

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

bug#8515: M-x indent-region should skip everything between <pre>-tags.

From: Stefan Monnier
Subject: bug#8515: M-x indent-region should skip everything between <pre>-tags.
Date: Tue, 19 Apr 2011 09:59:13 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> The following bug report (or perhaps feature request) was filed with the
> Debian tracker, and I wanted to ask your opinion about the issue.

The behavior of auto-indentation within things like <pre>...</pre> (or
here-docs in sh scripts, or strings in other languages, ...) is indeed
not perfect, is inconsistent between major modes, and moreover it's
always clear what is the best behavior.

I think what should happen is:
- indent-region should not modify those lines.
- indent-according-to-mode should not modify those lines either.
- indent-for-tab-command should behave as if in text-mode (i.e. call
  something like indent-relative).

Ideally, this should be recognized and treated as a case of "multiple
major modes" and you should even be able to specify what major mode
to use within the <pre>...</pre> region, so that the indentation there
can be better than text-mode's.


reply via email to

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