Changeset 177
- Timestamp:
- 10/24/02 21:52:42 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/j/LispShellMode.java
r171 r177 3 3 * 4 4 * Copyright (C) 2002 Peter Graves 5 * $Id: LispShellMode.java,v 1. 4 2002-10-19 19:46:53piso Exp $5 * $Id: LispShellMode.java,v 1.5 2002-10-24 21:52:42 piso Exp $ 6 6 * 7 7 * This program is free software; you can redistribute it and/or … … 75 75 public static void enter() 76 76 { 77 CommandInterpreter.shellEnter();78 79 77 final Editor editor = Editor.currentEditor(); 80 final Display display = editor.getDisplay();81 78 final Buffer buffer = editor.getBuffer(); 82 final Mode mode = buffer.getMode(); 83 if (mode != getMode()) { 79 if (buffer.getMode() != mode) { 84 80 Debug.bug(); 85 81 return; 86 82 } 83 84 Line dotLine = editor.getDotLine(); 85 Position pos = mode.findContainingSexp( 86 new Position(dotLine, editor.getDotOffset())); 87 88 CommandInterpreter.shellEnter(); 89 90 if (pos == null) 91 return; 87 92 88 LinedotLine = editor.getDotLine();93 dotLine = editor.getDotLine(); 89 94 if (dotLine.length() > 0) 90 95 return; … … 99 104 try { 100 105 buffer.getFormatter().parseBuffer(); 101 int indent = LispMode.getMode().getCorrectIndentation(dotLine, buffer);106 int indent = mode.getCorrectIndentation(dotLine, buffer); 102 107 if (indent != buffer.getIndentation(dotLine)) { 103 108 editor.addUndo(SimpleEdit.LINE_EDIT); … … 110 115 editor.moveCaretToDotCol(); 111 116 } else { 117 final Display display = editor.getDisplay(); 112 118 display.setCaretCol(indent - display.getShift()); 113 119 if (buffer.getBooleanProperty(Property.RESTRICT_CARET))
Note: See TracChangeset
for help on using the changeset viewer.