From cfa68e52a47c195401c49d1314c4c9283c112d7b Mon Sep 17 00:00:00 2001 From: Miguel de Benito Date: Mon, 31 Dec 2012 00:17:37 +0000 Subject: [PATCH] Add doc for texmacs-modes --- devel/scheme/utils/utils-overload.en.tm | 40 +++++++++++++++++++------ 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/devel/scheme/utils/utils-overload.en.tm b/devel/scheme/utils/utils-overload.en.tm index c0c5e4b..7a11342 100644 --- a/devel/scheme/utils/utils-overload.en.tm +++ b/devel/scheme/utils/utils-overload.en.tm @@ -1,4 +1,4 @@ - + @@ -83,15 +83,37 @@ redeclaration will be used. Inside a redeclaration, one may also use the keyword in order to explicitly access the former value of the redefined symbol. + - <\explain> - )> - <|explain> - This option is equivalent to ))> and - specifies that the definition is only valid when we are in a given - . New modes are defined using and - modes can inherit from other modes. - + <\explain> + )> + <|explain> + This option is equivalent to ))> and + specifies that the definition is only valid when we are in a given + . New modes are defined using and modes + can inherit from other modes. + + + <\explain> + + <|explain> + Use this macro to define new modes that you can use for contextual + overloading, for instance in . Modes may be made dependent + on other modes. This macro takes a variable number of definitions as + argument, each of the form . + End your and any dependencies with one , like + this: + + <\scm-code> + (texmacs-modes + + \ \ (in-verbatim% (inside? 'verbatim) in-text%) + + \ \ (in-tt% (inside? 'tt))) + + + When creating new modes remember to place first the faster checks + (against booleans, etc.) for speed.