redguardtoo / emacs.d

Fast and robust Emacs setup.
http://blog.binchen.org
GNU General Public License v3.0
2.39k stars 619 forks source link

Incorrect Closing Bracket Indentation on Emacs 28.1 #975

Closed Stumble closed 1 year ago

Stumble commented 2 years ago

Emacs 28.1 installed through snap. $ emacs --version GNU Emacs 28.1

if (cond) {
    for (auto a : v) {}
                      ^ when press enter in between brackets
}

expected:
if (cond) {
    for (auto a : v) {
        // cursor is here
    } 
}

but on Emacs 28.1:
if (cond) {
    for (auto a : v) {
        // cursor is here
}       // <-- incorrect indentation.
}

Same issue as this: https://github.com/hlissner/doom-emacs/issues/5200

redguardtoo commented 2 years ago

because 28.1 enabled electirc-pair-mode? Raise a issue to Emacs core team or the author of that mode.

phye commented 2 years ago

Same issue here. Really annoying.

phye commented 2 years ago

Someone already raised an issue, but still no updates from upstream... https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55340

sbwcwso commented 1 year ago

emacs 28.2 still have this problem, any solutions now?

redguardtoo commented 1 year ago

fixed c773ce13

Stumble commented 1 year ago

fixed c773ce1

Thanks! Just upgraded to 28.2 and verified!