I recently upgraded from emacs 23 to emacs 24. Using JavaScript using js-mode by default, I noticed a slight but annoying difference between js-mode in emacs23 and emacs24. To make sure this is not one of my settings, I started emacs23 and emacs24 with the --no-init-file
option, and I see the same problem, namely:
In emacs23 in js mode, when entering a closing curly brace }
it temporarily moves the cursor back into coincidence, opening curly braces, and then discards the closing figure to the appropriate level of indentation.
When I do this in emacs24, the temp cursor moves to the corresponding opening of the curly bracket, as expected, but does not indent the closing bracket, forcing me to press the tab key to finish the job.
Does anyone else see this discrepancy? If so, any ideas on how to fix this? Is there a nice variable like "indent-on-clos-curly" to set somewhere in my init.el?
I am using emacs on Xubuntu Linux (and I installed it from the source). I have not compared 23 to 24 on other platforms.
Note: someone might want to use Yegge js2-mode instead, but I usually don't like using it and would like js-mode to work correctly.
source share