First type the Ctrl-x Ctrl-e 'eval expression' command. In the mini-buffer you can enter expressions which are C expressions. Typically the following forms are valid:
In this context, the Tab key can be used to expand the Smac functions, user functions and variables names. If the mini-buffer is empty, a complete list of these is displayed in the message box.
ATTENTION Don't forget the semicolon ';' at the end of the C expression you want to evaluate, otherwise you will get a parser error line 0: syntax error message.
Inserts the argument at the current position.The
\_char is one of the
built-in functions available in Smac to drive the
editor. This example shows how to insert a special
character (via its ASCII code).
This example shows how to change font in Latex mode.
\_shell ( "date
\_shell is a built-in editor function.
The argument is executed in a sub-shell and the
result is inserted at the current position.
Opens a new text window, selects it, selects a file from a file-selector and loads it. Obviously it is easier to use the Window menu, but this example shows the Smac facilities to interpret built-in editor functions through an eval expression command.
\_def ("C-mode", "
In C-mode, binds goto
function to Ctrl-x e. The second argument syntax
\_binding), can be:
"c" --> key. "^[c" --> Esc key. "^[^c" --> Esc Ctrl key. "^c" --> Ctrl-key. "^xc" --> Ctrl-x key. "^x^c" --> Ctrl-x Ctrl-key.
`c' is any character except
`^^' appoints the character
`^ ' and
`^@' appoint the character
null (code 0).
It is also possible to bind keysym keys such as Home:
"k" --> key. "^[k" --> Esc key. "^xk" --> Ctrl-x key.
`k' is a keysym name (see §7.3.11 page ).