Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version

reindent-region

Arguments: lisp-edit-pane &key pretty-print

Reindents the selected lisp code or top-level lisp form in the specified lisp-edit-pane. If any text is currently selected, then that is the text that will be reindented; otherwise the top-level form that the text cursor is inside (or after) will be reindented.

If pretty-print is nil (the default), then spaces are simply added to or removed from the beginning of each line as needed for conventional lisp source code indentation. If pretty-print is true, then the top-level form is pretty-printed as a whole into the lisp-edit-pane (fitting the text to the current window width), replacing the previous version of the form. Pretty-printing will likely wrap the form differently (changing how much code appears on each line), and will always remove any comments that were in the top-level form.

The text cursor should end up in the same logical position as before the operation if pretty-print is nil; this is not feasible if pretty-print is true. In either case, parenthesis-matching will be updated after the operation (see parentheses-matched).

Reindenting may not work correctly if the text is auto-wrapped. Auto-wrapping will happen if the lisp-edit-pane has no horizontal scrollbar and one or more of its text lines is longer than the interior width of the window. Therefore, a lisp-edit-pane in which reindenting will be done should have a horiztonal scrollbar by setting its scrollbars property either to :horizontal or (more typically) to t (which is the default).

See also reindent-single-line.


Copyright (c) 1998-2012, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 9.0. This page was not revised from the 8.2 page.
Created 2012.5.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 9.0
Unrevised from 8.2 to 9.0.
8.2 version