Next: , Previous: , Up: Directive Definition   [Contents][Index] Standard Directives

In order to use a standard directive, use the :standard keyword with the corresponding character as value. For instance, calling ‘(set-format-directive #\Y :standard #\S)’ will result in making ~Y (and ~y by default, see Casing) have the same meaning as the standard ~S directive. By the way, this is how a newly created format table is made :initially :standard: for every standard directive character #\c, a call to ‘(set-format-directive #\c :standard #\c)’ is issued.

One thing about aliasing standard directives is worth mentioning here. FoCus is aware of the syntactic specificities of the standard directives. More precisely, we can split standard directives in three categories: simple directives like ~S, grouping directives like ~{~} which use a couple of characters and delimiting directives in which there is only one guy: the ~/ directive.

FoCus does nothing special about simple and grouping directives. In particular, you can very well alias only one of the two characters of a standard grouping directive (see, it’s pretty easy to completely mess up the standard set of directives). Or, to put it differently, creating a new grouping directive couple would involve two calls to set-format-directive, for example like this:

(set-format-directive #\` :standard #\{)
(set-format-directive #\' :standard #\})

On the other hand, FoCus understands when you alias the ~/ directive, and expects your custom format strings to be syntactically correct. For instance, if you alias ~! to ~/, then your format strings should look like this: "~!foo:bar!". It is not possible to match a #\/ with a #\!, in any order.

Next: , Previous: , Up: Directive Definition   [Contents][Index]