Next Previous Up Top Contents Index

4.8 Editor support: The Editor structure

addCommand

Function

Structure

Shell.Editor.Custom

Type

val addCommand: (string *string) -> unit

Syntax

addCommand (name, command-line) -> unit

Arguments

name
A custom editor name.

command-line
A command-line invocation string to associate with custom editor n.

Values

()

Description

Creates a custom editor by associating the editor name with a command-line invocation string command-line.

The command-line string may use the following codes:

%f

A filename.

%l and %sl

Starting line number.

%c and %sc

Starting character number.

%el

Ending line number.

%ec

Ending character number.

Use %% for the literal %.

Example

The Windows Notepad editor could be defined by:

Shell.Editor.Custom.addCommand("Notepad",
                    "Notepad %f");

MLWorks Reference Manual version 2.0 - 29 Jul 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker