Skip to content

"Indenting region..." #212

@edrx

Description

@edrx
Hi! Help!

Sometimes when I try to indent some text in comments with `M-q'
lua-mode says "Indenting region...", and it takes a long time (in big
files) and reindents the whole file in its default style, that is not
the style that I usually use... I took a look at the source code of
lua-mode.el and at the binding for `M-q' (`prog-fill-reindent-defun')
and I couldn't find an obvious fix - I _guess_ that what is happening
is that sometimes when the transient mark is disabled and the point is
inside a multi-line comment in which all the lines start with "--"
then lua-mode.el thinks that the region is the whole file, and tells
that to prog-fill-reindent-defun...

1) Is there an easy fix for that? Like setting some variable?

2) Do you need a reproducible example that can be run in an emacs -Q?
I can prepare one and a video if that helps...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions