I recently upgraded from emacs 23 to emacs 24. Working with JavaScript using the default js-mode, I've noticed a minor but annoying difference between js-mode in emacs23 vs. emacs24. To make sure it wasn't 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 you type a closing curly brace, }
, it temporarily jumps the cursor back to the match opening curly brace and then indents the closing brace to the appropriate level of indentation.
When I do it in emacs24, the temp cursor jump to the matching opening curly brace occurs as expected, but it does not indent the closing brace, making me hit the tab key to finish the job.
Is anyone else seeing this discrepancy? If so, any ideas on how to fix it? Is there is nice "indent-on-closing-curly" type of variable to set somewhere in my init.el?
I am using emacs on Xubuntu Linux (and I installed from source). I haven't compared 23 vs. 24 on other platforms yet.
Note: someone might want to suggest using Yegge's js2-mode instead, but I generally don't like using it and would like to get js-mode working right.