10.3 Listener commands

10.3.4 :USE

This command allows the replacement of some element of a form (either a subform or symbol) by another in an event from the history list, and then evaluates it. Consider the following example:

1. Type (* 5 5)

and then

2. Type :use + *

A copy of the previous event is extracted from the history list, and its * is replaced by a +. The new expression, (+ 5 5) is evaluated, yielding a 10.

CL-USER 10 > (* 5 5)
25

CL-USER 11 > :use + *
(+ 5 5)
10

CL-USER 12 >


FreeLisp User's Guide - 5 FEB 1996

Generated with Harlequin WebMaker