# &opt(4)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

&opt - MicroEmacs optional feature test

## SYNOPSIS

&opt str

## DESCRIPTION

This function can be used to test the availability of optional features in the current session of MicroEmacs. Some features, like spelling checker support, are a compilation option, other options like mouse support may also be unavailable on some platforms. The &opt function can be used by macros to check that required base functionality is available.

The function returns `1` in the given feature "str" is supported, otherwise it returns `0` if the feature is unknown or not supported in the running version.

## NOTES

Optional components of MicroEmacs 2009 are enabled/disabled at compile time, most options are configured by `MEOPT_`<NAME> `#define`'s within the source file `emain.h`. Following is a complete list of options, giving the opt string and `#define` label:

abb - MEOPT_ABBREV

Abbreviation functionality (see expand-abbrev(2)).

cal - MEOPT_CALLBACK

Callback and idle event handling (see create-callback(2)).

fen - MEOPT_FENCE

Fence matching (see fence(2m)).

cli - MEOPT_CLIENTSERVER

Client/server support (see Client-Server).

col - MEOPT_COLOR

All color support (making hilighting redundent etc, see add-color(2)).

cry - MEOPT_CRYPT

File encryption (see crypt(2m) mode).

deb - MEOPT_DEBUGM

Macro debugging (see $debug(5)).

dir - MEOPT_DIRLIST

Directory listing when loading a directory (see file-browser(3) and dir(2m) mode ).

ext - MEOPT_EXTENDED

Miscellaneous more advanced commands and features such as append-buffer(2).

fho - MEOPT_FILEHOOK

File type auto-detection and configuration (see add-file-hook(2)).

fra - MEOPT_FRAME

Multiple frames (Internal or external, see opt "mwf" and command create-frame(2)).

has - MEOPT_CMDHASH

Use a hash table for rapid command name lookup.

hil - MEOPT_HILIGHT

Hilight and user definable indentation rules (see hilight(2) and indent(2)).

hsp - MEOPT_HSPLIT

Horizontal window splitting (see split-window-horizontally(2)).

ipi - MEOPT_IPIPES

Interactive pipes (see ipipe-shell-command(2)).

ise - MEOPT_ISEARCH

Incremental search (see isearch-forward(2)).

lbi - MEOPT_LOCALBIND

Buffer, message-line and OSD local binding overrides (see buffer-bind-key(2)).

mag - MEOPT_MAGIC

Regular expression search engine (see magic(2m) mode).

mou - MEOPT_MOUSE

Mouse support (see $mouse(5)).

mwf - MEOPT_MWFRAME

Multiple window frame support (see opt "fra").

nar - MEOPT_NARROW

Buffer narrowing (see narrow-buffer(2)).

nex - MEOPT_FILENEXT

Location list stepping (see get-next-line(2)).

osd - MEOPT_OSD

On Screen Display GUI support (see osd(2)).

pok - MEOPT_POKE

Direct screen poking (see screen-poke(2)).

pos - MEOPT_POSITION

Position storing and returning (see set-position(2)).

pri - MEOPT_PRINT

Printing support (see print-buffer(2)).

rcs - MEOPT_RCS

File Revision Control Support (see $rcs-co-com(5)).

reg - MEOPT_REGISTRY

Internal registry and history support (see read-registry(2)).

scr - MEOPT_SCROLL

Window scroll-bar support.

soc - MEOPT_SOCKET

URL support, FTP and HTTP via sockets (see find-file(2)).

spa - MEOPT_SPAWN

External process launching (see shell-command(2)).

spe - MEOPT_SPELL

Spelling checker support (see spell(2)).

tag - MEOPT_TAGS

Tags support (see find-tag(2)).

tim - MEOPT_TIMSTMP

File timestamping on save (see time(2m) mode).

typ - MEOPT_TYPEAH

Input detect or 'type-ahead' for background processing support.

und - MEOPT_UNDO

Undo support (see undo(2)).

wor - MEOPT_WORDPRO

Word-processor style commands like fill-paragraph(2) (see forward-paragraph(2)).

## EXAMPLE

The following example checks for URL support and if not available it pops up an error:

    !if &not &opt "soc"
        osd-dialog "Opt Test" "Error: No URL support!" "  &OK  "
    !endif

## SEE ALSO

Building MicroEmacs.

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>