All Manuals > LispWorks Editor User Guide > 4 Editing Lisp Programs

NextPrevUpTopContentsIndex

4.2 Syntax coloring

When in Lisp mode, the LispWorks editor provides automatic Lisp syntax coloring and parenthesis matching to assist the editing of Lisp programs.

You can ensure a buffer is in Lisp mode as described in Automatic entry into Lisp mode.

To modify the colors used in Lisp mode syntax coloring, use Preferences... > Environment > Styles > Colors And Attributes as described in the LispWorks IDE User Guide . Adjust the settings for the styles whose names begin with "Lisp".

Commands controlling syntax coloring have names commencing Font Lock, for example Font Lock Fontify Buffer.

Font Lock Fontify Block

Editor Command

Arguments: None
Key sequence: None

The command Font Lock Fontify Block fontifies some lines the way Font Lock Fontify Buffer would. The lines could be a Lisp definition, a paragraph, or a specified number of lines.

If a prefix argument is supplied, Font Lock Fontify Block fontifies that many lines before and after the current point. If no prefix argument is supplied and the editor variable font-lock-mark-block-function is nil it fontifies 16 lines before and after. If no prefix argument is supplied and font-lock-mark-block-function is non-nil, it is used to delimit the region to fontify.

Font Lock Fontify Buffer

Editor Command

Arguments: None
Key sequence: None

The command Font Lock Fontify Buffer fontifies the current buffer.

Font Lock Mode

Editor Command

Arguments: None
Key sequence: None

The command Font Lock Mode sets Font Lock mode.

Without a prefix argument it switches Font Lock mode on and off. With a prefix argument it sets Font Lock mode on when the argument is positive and off otherwise.

Global Font Lock Mode

Editor Command

Arguments: message
Key sequence: None

The command Global Font Lock Mode switches Global Font Lock mode on and off.

With a prefix argument it turns Global Font Lock mode on if and only if the argument is positive.

If message is non-nil the command displays a message saying whether Font Lock mode is on or off.

It returns the new status of Global Font Lock mode (non-nil means on).

When Global Font Lock mode is enabled, Font Lock mode is automatically turned on for modes that support it, which currently is only Lisp mode.

font-lock-mark-block-function

Editor Variable

Default value: lisp-font-lock-mark-block-function
Mode: Lisp

The editor variable font-lock-mark-block-function if non-nil is a function used by Font Lock Fontify Block to delimit the region to fontify.

The default value in Lisp mode delimits the current Lisp definition.

See also: Font Lock Fontify Block


LispWorks Editor User Guide (Unix version) - 9 Dec 2014

NextPrevUpTopContentsIndex