products/sources/formale Sprachen/Isabelle/Tools/jEdit/dist/macros/Emacs image not shown  

Quellcode-Bibliothek

© Kompilation durch diese Firma

[Weder Korrektheit noch Funktionsfähigkeit der Software werden zugesichert.]

Datei: jfrTraceIdEpoch.cpp   Sprache: Unknown

Haftungsausschluß.bsh KontaktCS {CS[80] Abap[127] [0]}diese Dinge liegen außhalb unserer Verantwortung

/**
 * Transpose character at caret with previous character, and move caret
 * forward one. Emulates Emacs "transpose-chars" command (without prefix
 * argument support).
 */


source (MiscUtilities.constructPath(dirname(scriptPath), "EmacsUtil.bsh"));

void emacsTransposeChars()
{
    caret = textArea.getCaretPosition();
    if ((caret == 0) || atEndOfBuffer())
    {
        beep();
        return;
    }

    char chCur = charAtCaret();
    char chPrev = charAt (caret - 1);
    selection = new Selection.Range (caret - 1, caret + 1);
    textArea.setSelection (selection);
    textArea.setSelectedText (new String ("" + chCur + chPrev));
    textArea.removeFromSelection (selection);
}

emacsTransposeChars();


[ Seitenstruktur0.92Drucken  ]