Emacs OpenVMS Library Reference

DCLMODE, A Mode for Writing DCL Command Procedures

The DCLMODE library defines functions to help write DCL command procedures. The library defines the function DCL-mode, which enables the DCL Mode major mode.

DCL-mode provides facilities for DCL comment handling and automatic indentation of DCL command lines.

CMS, An Interface to DEC/CMS

The CMS library of functions provide an interface to the Code Management System (DEC/CMS) from within Emacs. The CMS library functions are analogous to their equivalents in the CMS application.

The functions are not bound to any keys by default. If you do want to bind the functions, create a file called CMS.KEY containing your bindings in your EMACS_PATH. The CMS library will load this file when you load the CMS library.

Most CMS library functions have an alternate form when passed a prefix argument: some commands will prompt for input in the Mini-buffer; others will display a form which you can fill in to modify the default action of the command. When you have completed the forms, use the exit-emacs command to execute the command. To abort the form, use the ^C command.

For more information on CMS libraries and the DEC/CMS layered product itself, see the OpenVMS DECset documentation for details.

The Emacs CMS interface functions are:

(cms-set-library)

Sets the current CMS library by translating the logical name CMS$LIB.

If provided a prefix argument, cms-set-library prompts for the name of the library in the Mini-buffer.

(cms-show-library)

Prints the name of the currently set CMS library in the Mini-buffer.

(cms-show-elements)

Lists the elements in the current CMS library in the buffer CMS list, which is popped onto the screen.

If a prefix argument is provided, a Show Elements form is popped onto the screen. The form contains the following fields:

· Elements

· Include groups flag (default is 1).

(cms-show-class)

Lists the classes in the current CMS library in the CMS listbuffer which is popped onto the screen.

If passed a prefix argument, cms-show-class prompts for the class to list in the Mini-buffer.

(cms-show-group)

Lists the groups in the current CMS library in the CMS listbuffer which is popped onto the screen. If passed a prefix argument, cms-show-group prompts for the group to list in the Mini-buffer.

(cms-show-reservation)

Lists the element reservations in the current CMS library in the CMS list buffer.

If passed a prefix argument, cms-show-reservations pops a Show Reservations form onto the screen. The fields in the form are:

· Elements

· Generation

· User name.

(cms-fetch)

Prompts for an element name and fetches the specified element, reading it into a new buffer and making that buffer current.

If passed a prefix argument, cms-fetch pops up a Fetch form. The fields in the form are:

· Element

· Generation (defaults to highest generation)

· No history flag (default is 1)

· No notes flag (default is 1).

(cms-reserve)

Prompts for an element name and a remark in the Mini-buffer and reserves the specified element, reading it into a new buffer and making that buffer the current buffer.

If passed a prefix argument, cms-reserve pops a Reserve form onto the screen. The fields in the form are:

· Element

· Remark

· Generation

· No history flag (default is 1)

· No notes flag (default is 1).

(cms-unreserve)

Prompts for the name of an element and a remark in the Mini-buffer and unreserves the specified element.

If passed a prefix argument, cms-unreserve does not prompt for a remark.

(cms-replace)

Prompts for the name of an element and replaces the specified element into the CMS library.

If passed a prefix argument, cms-replace pops up a Replace form onto the screen. The fields in the form are:

· Element

· Remark

· Variant

· Reservation flag

(cms-create-element)

Prompts for the name of an element and creates the named element.

If passed a prefix argument, cms-create-element pops up a Create Element form. The fields in the form are:

· Element

· Remark

· History

· Keep flag

· Reservation flag

· Concurrency flag (default is 1)

· Reference flag (default is 0).

(cms-copy-element)

Prompts for the name of an existing element and a new element name, then copies the existing element to the new element.

If passed a prefix argument, cms-copy-element pops up a Copy Element form. The fields in the form are:

· Element

· New element

· Remark.

(cms-insert-element)

Prompts for the name of an existing element and a group name, then inserts the specified element into the named group.

If passed a prefix argument, cms-insert-element pops up an Insert Element form. The fields in the form are:

· Element

· Group

· Remark.

(cms-insert-group)

Prompts for the name of a subgroup and the group into which the subgroup should be inserted, then performs the insertion.

If passed a prefix argument, cms-insert-group pops up an Insert Group form. The fields in the form are:

· Subgroup

· Group

· Remark.

(cms-insert-generation)

Prompts for an element name and a class name, then inserts the latest generation of the specified element into the named class.

If passed a prefix argument, cms-insert-generation pops up an Insert Generation form. The fields in the form are:

· Element

· Class

· Generation (default is highest generation)

· Remark.

(cms-modify-class)

Pops up a Modify Class form which allows you to modify class attributes. The fields in the form are:

· Class

· Remark

· New class

· New class remark

· Read-only flag.

(cms-modify-group)

Pops up a Modify Group form which allows you to modify group attributes. The fields in the form are:

· Group

· Remark

· New group

· New group remark

· Read-only flag.

(cms-modify-element)

Pops up a Modify Element form which allows you to modify element attributes. The fields in the form are:

· Element

· Remark

· New element

· New element remark

· History

· Concurrency flag (default is 1)

· Reference flag (default is 1).

(cms-remove-element)

Prompts for the name of an element and a group name and removes the element from the specified group.

If passed a prefix argument, cms-remove-element pops up a Remove Element form. The form contains the following fields:

· Element

· Group

· Remark.

(cms-remove-generation)

Prompts for an element name and a class name and removes the specified generation of the element from the class.

If passed a prefix argument, cms-remove-generation pops up a Remove Generation form containing the following fields:

· Element

· Class

· Remark.

(cms-remove-group)

Prompts for a subgroup name and a group name, then removes the subgroup from the specified group.

(cms-delete-class)

Prompts for a class name and deletes the specified class.

(cms-delete-element)

Prompts for an element name and a remark deletes the specified element. If a prefix argument is provided, the remark is not required.

(cms-delete-group)

Prompts for a group name and a remark, then deletes the specified group. If a prefix argument is provided, the remark is not required.

(cms-remark)

Prompts for a remark and enters this into the CMS library's remark history.

MESSAGES, Displaying Broadcast Messages

The MESSAGES library defines functions which trap OpenVMS broadcast messages and display their text in a small window at the bottom of the screen.

To start the trapping of broadcast messages, load the MESSAGES package with ESC-x execute-mlisp-file.

The variable broadcast-feeps can be used to customise the behaviour of MESSAGES library; it contains the number of bell characters that are sent to the terminal when a new message is received. The default value of broadcast-feeps is 1.

SPELL, Spelling Error Detection And Correction

The SPELL defines functions which provide a user interface to Emacs' interface to the DECspell layered product.

The following functions are provided:

(spell-line)

This function spell-checks each word on the line in which dot is located. For each spelling error reported by DECspell, a list of possible spelling corrections is displayed and you are asked to input the correct spelling. Full word expansion is available during this operation. If you type just a Return, the word will not be changed.

(spell-word-in-buffer)

This function checks the spelling of the word in which dot is located. If the spelling is incorrect, a list of possible corrections are displayed and you are asked you to type one. Full word expansion is enabled.

(spell-newline)

This function is used to replace the binding for the Return key in buffers that require automatic spell checking. It causes the current line to be checked before the newline function is executed.

(spell-newline-and-indent)

This function is used to replace the binding of the Linefeedkey in buffers that require automatic spell checking. It causes the current line to be checked before the newline-and-indentfunction is executed.

(make-text-mode-spell)

This function is used to make Text Mode perform automatic spelling detection and correction as text is typed in. If you require this feature, you should include the following lines in your EMACSINIT.ML:

(execute-mlisp-file "spell")

(make-text-mode-spell)

THESAURUS, An Interface to the DECspell Thesaurus

The THESAURUS library defines two functions that provide an interface to the DECspell Thesaurus from within Emacs:

(et-word)

Prompts for a word in the Mini-buffer and checks this against the DECspell thesaurus. If the word is found in the thesaurus, Emacs pops up a buffer called Electronic Thesaurus and displays in the buffer alternatives for the specified word. If the specified word is not found in the thesaurus, an error message is displayed.

(et-word-in-buffer)

Checks the word that dot is in against the thesaurus. If the word is found in the thesaurus, a list of possible alternatives is displayed in the Electronic Thesaurus buffer. If the word is not found, an error message is displayed. THESAURUS.KEY

There are no default key bindings for these functions, but you can define your own bindings by creating a file called THESAURUS.KEY in your EMACS_PATH. The file should contain appropriate MLisp commands to bind the thesaurus functions to the desired key bindings. The THESAURUS library will attempt to load this file automatically when you load the THESAURUS library.