/**
 * Insert a newline after the caret, without moving the caret. This macro
 * corresponds to the Emacs (open-line) capability.
 */
source (MiscUtilities.constructPath(dirname(scriptPath), "EmacsUtil.bsh"));

void emacsOpenLine()
{
    caret = textArea.getCaretPosition();
    buffer.insert (caret, "\n");
    // Caret moved. Back it up.
    textArea.goToPrevLine (false);
    textArea.goToEndOfLine (false);
}

emacsOpenLine();


