Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Indenting region..." #212

Open
edrx opened this issue Dec 18, 2023 · 0 comments
Open

"Indenting region..." #212

edrx opened this issue Dec 18, 2023 · 0 comments

Comments

@edrx
Copy link

edrx commented Dec 18, 2023

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...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant