Some more sophisticated commands, replacing long sequences of manual keyboard labour by the programmer, are provided by the companion package, Languide. As described here, they are accessed through some wrapper functions which apply them to the versor selection. You can also access these directly to act on GNUemacs region; See Overview (Languide: Language-guided editing).
A typical action (probably the one the author uses most often) is converting an expression to a local variable (so that the value can be re-used), involving the following steps:
Likewise, there is a function to turn a block of code into a function (working out automatically what needs to be passed in as the argument list), and replace its original occurrence with a call to the new function.
To draw attention to what they have done, these functions highlight, with an orange background, any changes they make away from the selection. The highlighting is not the Versor selection, and is removed on your next input to GNUemacs.
These commands are divided into two groups, one of them acting on expressions (as used in both functional and imperative languages) and one acting on statements, as used in imperative languages.
There are also facilities by which languide can tell you when it has spotted something it knows about.