diff --git a/devel/scheme/overview/overview-utilities.en.tm b/devel/scheme/overview/overview-utilities.en.tm index 81011dc..5317a15 100644 --- a/devel/scheme/overview/overview-utilities.en.tm +++ b/devel/scheme/overview/overview-utilities.en.tm @@ -1,4 +1,4 @@ - + @@ -6,10 +6,10 @@ Besides the basic concepts from the previous sections, which underly the - scheme API for , the kernel implements several - other utilities and language extensions. In this section, we will briefly - sketch some of them on hand of examples. Further details can be found in - the chapter about extensions to and + scheme API for , the kernel implements several other + utilities and language extensions. In this section, we will briefly sketch + some of them on hand of examples. Further details can be found in the + chapter about extensions to and utilities|../utils/scheme-utils.en.tm>. @@ -23,39 +23,46 @@ |1+>> - in the current buffer, where > and - > are general expressions, one may use - the following command: + in the current buffer, where > and + > are general expressions, one may use the + following command: - + <\session|scheme|default> <\input|scheme] > (select (buffer-tree) '(:* (:match (frac :%1 (concat "1+" (sqrt :%1)))))) - > + - supports several commands for asynchronous evaluation of scheme - commands and interactive dialogues with the user. In general, asynchroneous - instructions have to be encapsulated inside a `` block''. For - instance, when executing the following scheme command, you will be prompted - for two numbers, whose product will be displayed in the footer: + supports several commands for interactive dialogues with the + user. For instance, when executing the following scheme command, you will + be prompted for two numbers, whose product will be displayed in the footer: - <\with|prog-language|scheme|prog-session|default> - <\session> - <\input|scheme] > - (dialogue + <\session|scheme|default> + <\input|Scheme] > + (user-ask "First number:" - \ \ (let* ((a (string-\number (dialogue-ask "First number:"))) + \ \ (lambda (a) - \ \ \ \ \ \ \ \ \ (b (string-\number (dialogue-ask "Second - number:")))) + \ \ \ \ (user-ask "Second number:" - \ \ \ \ (set-message (number-\string (* a b)) "product"))) - - - + \ \ \ \ \ \ (lambda (b) + + \ \ \ \ \ \ \ \ (set-message (number-\string (* + (string-\number a) + + \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (string-\number + b))) + + \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "product"))))) + + + <\input|Scheme] > + \; + + @@ -65,13 +72,13 @@ call-back routine. The call-back routine is called whenever you change the corresponding preference. For instance: - <\scheme-fragment> + <\scm-code> (define-preferences \ \ ("Gnu's hair color" "brown" notify-gnu-hair-change) \ \ ("Snail's cruising speed" "1mm/sec" notify-Achilles)) - + Preferences can be set, reset and read using , and . @@ -88,7 +95,7 @@ Typically, the declaration of a new format and a converter would look like: - <\scheme-fragment> + <\scm-code> (define-format blablah \ \ (:name "Blablah") @@ -102,7 +109,7 @@ \ \ (:require (url-exists-in-path? "bla2tex")) \ \ (:shell "bla2tex" from "\" to)) - +