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

Previous Next

Package: emacs;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Sun, 17 Apr 2011 18:58:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 8515 <at> debbugs.gnu.org, Juhapekka Tolvanen <juhtolv <at> iki.fi>, 448563-forwarded <at> bugs.debian.org
Subject: bug#8515: M-x indent-region should skip everything between <pre>-tags.
Date: Tue, 19 Apr 2011 09:59:13 -0300
> 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.
  

        Stefan




This bug report was last modified 14 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.