0

In CC-mode when the electric behavior of characters is enabled, typing the semicolon character triggers the c-electric-semi&comma command. That inserts the semicolon, terminates the line, moves point to next line and indents it.

Question: How can I disable this electric behaviour of the semicolon temporarily, while retaining the electric behaviour of the other characters?

For example, I'd do that when I want to write several lines with comments at the end of the line, so I'd be able to type the semicolon and stay on the same line so I can write the C or C++ style comment at the end of the line.

I know how to disable RET electric behaviour (by removing it from the electric-indent-char list). But ?; is not part of that list when the semicolon is exhibiting electric behaviour.

PRouleau
  • 796
  • 3
  • 10

0 Answers0