X-Injected-By: benja@lorien.it.jyu.fi Date: Mon, 1 Apr 2002 00:07:43 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: binary N# New cell + move (-*-Python-*-) # Create a new cell and move there. if not isPending: setPendingAction(this_cell) else: c = cell.N(dim, dir) Cursor.set(window, c) ExternalEditor.edit(c) Delete# Delete cell, and move cursor (-*-Python-*-) # mv: Cell to move the cursor to. mv = None for axis in range(len(dims)): for dir in (-1, 1): # Try to set 'mv' to a neighbour of 'cell' if not mv: mv = cell.s(dims[axis], dir) # If no neighbour's found: set 'mv' to home cell if not mv: mv = space.getHomeCell() Cursor.set(window, mv) cell.delete()