1/** 2 * Kill to the end of the current sentence. Emulates the Emacs "kill-sentence" 3 * command. 4 */ 5 6source (MiscUtilities.constructPath(dirname(scriptPath), "EmacsUtil.bsh")); 7 8void emacsKillSentence() 9{ 10 caret = textArea.getCaretPosition(); 11 eos = findEndOfSentence(); 12 13 selection = new Selection.Range (caret, eos); 14 textArea.setSelection (selection); 15 addToClipboardAndHistory (selection); 16 textArea.replaceSelection (""); 17 textArea.removeFromSelection (selection); 18} 19 20emacsKillSentence(); 21