An `open-line' command.
/**
* Replace the current region with modifier(selection). Deactivates region and
* sets point to the end of the inserted text, unless keep_point is true, in
* which case the point will be left at the beginning of the inserted text.
*/
function modify_region(field, modifier, keep_point) {
/**
* Given a callback func and an interactive context I, call func, passing either
* a focused field, or the minibuffer's input element if the minibuffer is
* active. Afterward, call `ensure_index_is_visible' on the field. See
* `paste_x_primary_selection' and `open_line' for examples.
*/
function call_on_focused_field(I, func) {