Command lines

Bemacs Command line

bemacs passes the whole command line to the Barry's Emacs application for processing.

Barry's Emacs then parses the command line into its component parts, called arguments. Having parsed the command line Barry's Emacs determines the package for the command line. The default package is called emacs. This can be overridden by using the /package switch.

/package=package-name
This causes emacs to execute the MLisp command package-name-com. If package-name-com is not yet defined then emacs loads the MLisp module named package-name.mlp.
--
This causes emacs to treat all the following command line arguments as not being qualifiers. This is useful for allowing Emacs to open a file whoes name starts with a "+" or "-" character.
It is the job of the package to process the command line. The default package is named "emacs". How the emacs package handles the command line is documented in the User Guide.

Writing a package

Emacs will automatically load a packages definition from an MLisp module named package from the file package.mlp. That module must contain atleast one function definition for the MLisp function package-com.

It is the job of the package to process the command line. Emacs has already parsed the command line into its component parts. Use the following functions to access the components of the command line:

(argc)
Returns the number of command line arguments. There is always one arguments.
(argv position)
Returns the text of the argument at position position. Position zero always returns the name of the package.
(arg-is-qualifier position)
Returns true if the argument at position position is a command line qualifier (also called a command line switch).

If the package does not use one of these functions then Emacs will call visit-file for each argument that is not a qualifier.

BemacsServer Command line

BEmacsServer supports a full command line. BemacsServer can be used directly if required. BEmacsServer supports the following command line options:

/restore[=file]
Restore the Emacs Environment from file.
/norestore
Do not restore any Emacs Environment file
/package=package-file
See above for details
/RegServer
register the OLE interface
/embedding
used by OLE
/automation
used by OLE
/UnRegServer
unregister the OLE interface (not implemented in this version)