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:   Sprache: Unknown

Columbo aufrufen.bsh zum Wurzelverzeichnis wechselnCS {CS[80] Abap[127] [0]}Datei anzeigen

/**
 * 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();


[ Original von:0.68Diese Quellcodebibliothek enthält Beispiele in vielen Programmiersprachen. Man kann per Verzeichnistruktur darin navigieren. Der Code wird farblich markiert angezeigt.  ]