Function Entry: CLAL-SEDIT

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: CLAL-SEDIT

Name

clal-sedit

Class

clautolisp Extension Function

Syntax

(clal-sedit [object])

Arguments and Values

  • object — optional. Resolves as follows: omitted or nil -> a stand-alone form starting at nil; a symbol -> recall its recorded definition (by name); a string -> a file or directory path; any other value -> edited as a sexp.

Description

Edit object with the interactive sedit structural editor (sedit spec §2). It runs the editor on the terminal (*standard-input* / *standard-output*), bridging the value to and from sedit through its source text, and installs EVAL and LOAD hooks so edited definitions can be evaluated or loaded into the running system. See the user-manual chapter "sedit and the aldo form navigator" and the normative clautolisp/documentation/clautolisp-sedit-spec.org.

Return Values

The edited object, read back from the editor's final tree (never by evaluation). Also sets clautolisp.sedit:*clal-sedit-initial-form* and clautolisp.sedit:*clal-sedit-last-result*.

Side Effects

Runs an interactive terminal session; updates the two clautolisp.sedit special variables above; may evaluate or load forms into the running system if you invoke the editor's eval/load commands.

Affected By

  • The sedit recording state (used to recall a symbol's definition).
  • *standard-input* / *standard-output*.

Exceptional Situations

Parse/read errors from the edited source text propagate as AutoLISP errors.

Examples

(clal-sedit '(defun f (x) (* x x)))
=> (DEFUN F (X) (* X X))          ; after editing on the terminal
(clal-sedit "/home/me/lib/util.lsp")   ; edit a file

Availability

  • clautolisp: documented (this entry); implemented since clautolisp 1.4.x.
  • AutoCAD: NOT present.
  • BricsCAD: NOT present.

Source Notes

  • clautolisp-only extension. Normative behaviour: clautolisp/documentation/clautolisp-sedit-spec.org; tutorial: user-manual chapter "sedit and the aldo form navigator".