News for hackers. Stuff that matters.
Re:If you type the letter “i” and it autocorrects to an “A” ... by DonHopkins on Saturday November 04, 2017 @11:34PM (#15628074)
I prefer "electric" to "smart".

https://www.emacswiki.org/emacs/Electricity

Electricity

The use of “electric” in Emacs is based upon alternative uses of the English word that have evolved over time, at least in the U.S. These are derived from personal experiences with using electricity. For example, a U.S. English dictionary lists both “electrifying” and “thrilling” as definitions for “electric”. Typical usage might be: “The lion act at the circus was electric. I sat on the edge of my seat the entire time!” So, when someone describes a mode or a function in Emacs as “electric”, they are claiming you will be thrilled or electrified by some of its features.

Electric modes tend to do some things “automagically” and/or very cleverly for the user. The electric features are typically continuously active while the MajorMode is active, taking control of things, monitoring and reacting to every input the user makes. Often, electric modes and functions require fewer keystrokes from the user to navigate and to enter data. Sometimes the behavior is “cool”, “clever”, “seems like magic”, and/or is “just really convenient”. You may or may not like what an electric mode or an electric function does while it is active but, whatever it does, it shouldn’t be routine. It should deliver some sort of “Gee Wiz!” behavior.

Examples include certain printing characters in CcMode which after being inserted also indent the current line and/or insert a newline, the ElectricBufferList, and ElectricPair.

https://www.gnu.org/software/emacs/manual/html_node/emacs/El...

26.12.2 Electric C Characters

In C mode and related modes, certain printing characters are electric—in addition to inserting themselves, they also reindent the current line, and optionally also insert newlines. The electric characters are {, }, :, #, ;, ,, <, >, /, *, (, and ).

Re:If you type the letter “i” and it autocorrects to an “A” ... by lorenzhs on Sunday November 05, 2017 @11:20AM (#15630048)
Yup this is generally handled very well by Emacs modes and quite useful. But the electricity in C++ mode can be super frustrating when using C++17 which it seemingly hasn’t been updated to handle yet. For example, it keeps double-indenting things inside “if constexpr(...)” environments.