Emacs v24.5.1でCPlusPlusModeを使用すると、式を入力するときに一致するかっこと中括弧を自動的に作成します。具体的にはCPlusPlusMode:マッチする括弧または中括弧を作成する
入力するときに、例えば、「{」、CPlusPlusModeは、対応する括弧を作成する必要があり、以下の例のように、間にカーソルを移動:
if (a < b) {
// cursor here: default behavior
if (a < b) {
// cursor here: anticipated behavior
}
'autopair'モードをインストールします。 – molbdnilo
これについての広範な議論:http://stackoverflow.com/questions/1023770/automatically-closing-braces-in-emacs –