&opt - MicroEmacs optional feature test
&opt str
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.
Optional components of MicroEmacs '06 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
cal - MEOPT_CALLBACK
fen - MEOPT_FENCE
cli - MEOPT_CLIENTSERVER
col - MEOPT_COLOR
cry - MEOPT_CRYPT
deb - MEOPT_DEBUGM
dir - MEOPT_DIRLIST
ext - MEOPT_EXTENDED
fho - MEOPT_FILEHOOK
fra - MEOPT_FRAME
has - MEOPT_CMDHASH
hil - MEOPT_HILIGHT
hsp - MEOPT_HSPLIT
ipi - MEOPT_IPIPES
ise - MEOPT_ISEARCH
lbi - MEOPT_LOCALBIND
mag - MEOPT_MAGIC
mou - MEOPT_MOUSE
mwf - MEOPT_MWFRAME
nar - MEOPT_NARROW
nex - MEOPT_FILENEXT
osd - MEOPT_OSD
pok - MEOPT_POKE
pos - MEOPT_POSITION
pri - MEOPT_PRINT
rcs - MEOPT_RCS
reg - MEOPT_REGISTRY
scr - MEOPT_SCROLL
soc - MEOPT_SOCKET
spa - MEOPT_SPAWN
spe - MEOPT_SPELL
tag - MEOPT_TAGS
tim - MEOPT_TIMSTMP
typ - MEOPT_TYPEAH
und - MEOPT_UNDO
wor - MEOPT_WORDPRO
The following example checks for URL support and if not available it pops up an error:
!if ¬ &opt "soc" osd-dialog "Opt Test" "Error: No URL support!" " &OK " !endif
Copyright (c) 1998-2006 JASSPA
Last Modified: 2006/08/19
Generated On: 2006/10/07