If I select everything in LaTeX-mode (AUCTeX) and auto-fill the region, the indentation of all lines is corrected. This is the part I like.

However, it also breaks all long lines (which I think is the actual purpose of that function). But I don't like hard line wrapping.

Is there a way I can fix the indentation of an entire file without the lines being wrapped in the actual text? Wrapping them in the displayed text is desired.

1 Answer 1


If you only want to indent a region, you should call an indenting function, not a filling function that, as you guessed, is meant to break lines.

For example, you can use C-M-\ (M-x indent-region RET) to indent the active region.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.