$system(5)
[Home]
[Commands]
[Variables]
[Macro-Dev]
[Glossary]
NAME
SYNOPSIS
DESCRIPTION
The $system is used to define and configure the MicroEmacs environment, it is a bit based flag where:-
0x001
This bit is set if MicroEmacs is running in Console mode. On UNIX systems the default is to use X whenever possible, in which case this bit will be clear. If X is not used then a TERMCAP base interface is used instead and this bit will be set (see notes below on how to set which interface to use). On all other systems this bit will be clear.
0x002
If this bit is set then the current system supports definable RGB colors allowing any color to be created and used in a
color scheme. This bit cannot be set, typically Windows and UNIX X-Windows systems support this.
0x004
If this bit is set then the current system supports ANSI colors (8 colors, black, red, green, yellow, blue, magenta, cyan & white), bits 0x002 and 0x004 are mutually exclusive. On UNIX systems if the TERMCAP interface is being used then this bit can be changed to (de)select the used of color. Many unix terminals do not support color so this should be set appropriately. On all other systems this bit cannot be changed and MS-DOS is currently the only other system to use ANSI colors.
0x008
If this bit is set then the current system supports Extended ANSI colors, brighter versions of the 8 ANSI colors doubling the number of colors available to 16. On UNIX systems if the TERMCAP interface is being used then this bit can be changed to (de)select the used of bold with color to create this extended color set for foreground colors. But many unix terminals do not support this use of color with the bold font so this should be set appropriately. On all other systems this bit cannot be changed and MS-DOS is currently the only other system to support this.
0x080
This bit is set if the current system is a UNIX based system such as LINUX or HPUX. This bit cannot be altered, its use is within macros.
0x100
This bit is set if the current system is a Microsoft based system such as DOS or Windows '95. This bit cannot be altered, its use is within macros.
0x200
If this bit is set then the current system uses the concept of drives (i.e. c:/ on DOS systems). This bit cannot be altered, its use is within macros.
0x400
If this bit is set then a DOS style 8.3 file naming system should be used (i.e. "BBBBBBBB.XXX"), otherwise an unlimited file name length is used. This effects the backup and auto-save file names generated by MicroEmacs, the bit can be altered on systems that support unlimited file name length.
0x800
If this bit is set then the current system supports and uses
ipipe-shell-command(2) when required. For systems such as DOS which cannot support ipipes, this bit will be clear and cannot be altered. For systems which do support ipipes, this bit can be cleared to disable their use.
0x1000
If this bit set, the then execution of the
tab(2) command (bound to tab) always checks and adjusts the indentation of the current line when the current buffer is in
cmode(2m) or has an
indentation method. If the bit is clear then tab only checks the indentation when the cursor is in column zero.
0x2000
If this bit is set the main menu Alt hot-key bindings are enabled. These are dynamic bindings automatically generated from the main menu. Typically the first item in the main menu is "File" with a hot key of 'F', with this bit set 'A-f' will open this menu item. Note that global and local key bindings override these. Also see bit 0x4000.
0x4000
If this bit is set the Alt key acts as a
prefix 1 modifier key. By default 'A-n' is not bound, with this bit set the key is inferred to 'esc n' which is bound to forward-paragraph. Note that global, local and menu hot-key bindings override these. Also see bit 0x2000.
0x8000
If this bit is set the
undo history is kept after a save allowing the
undo(2) command to back-up changes beyond the last save. When clear the undo history is discarded after the buffer is saved.
0x10000
Enable box character rendering fix, supported on Win32 and XTerm interfaces only. Windows ANSI fonts and many XTerm ISO-8859-1 fonts do not have well formed box characters which are used by
osd(2) and other commands to create a better looking interface. When this bit is enabled MicroEmacs traps the printing of characters with an ASCII value of less than 32 and renders them directly. Following is a table of supported characters, other characters in the range of 0x00 to 0x1f not listed are rendered as a space:
0x09
0x0b
Box Character; Bottom right
0x0c
0x0d
0x0e
Box Character; Bottom left
0x0f
Box Character; Centre cross
0x10
0x11
0x12
Box Character; Horizontal line
0x15
0x16
0x17
Box Character; Bottom Tee
0x18
0x19
Box Character; Vertical Line
0x1e
0x1f
0x20000
Enables the client server, default is disabled (UNIX and Win32 NT or Win95+ platforms only). When enabled a hidden "*server*" buffer is created which monitors commands written to the server, the socket "/tmp/mesrvuid" on UNIX systems and the command input file "$TEMP/me$MENAME.cmd" on Win32 systems. Commands can be written out using the command
ipipe-write(2) while in the "*server*" buffer, the command is written to the same socket on UNIX systems and to the response file and response file "$TEMP/me$MENAME.rsp" on Win32 systems. This functionality is used by the -m and -o
command-line options and by the
MicroSoft DevStudio interface.
0x40000
Enables the capture of the Alt space key ("A-space"), default is enabled (Win32 platform only). In the Windows environment the Alt Space key is used to activate the main window's pull down menu at the top left. if this bit is set MicroEmacs captures this key and executes it as normal, thereby disabling this standard windows binding.
EXAMPLE
The follow example works out the current buffer's backup file name using $system to determine the naming system being used by MicroEmacs:-
set-variable #l0 &stat "a" $buffer-fname
; Is an 8.3 dos style naming system being used?
!if &band $system 0x400
!if ¬ &set #l1 &sin "." #l0
set-variable #l1 &cat #l0 ".~~~"
!elif &gre &set #l1 &sub &len #l0 #l1 2
set-variable #l1 &cat &lef #l0 &sub &len #l0 1 "~"
!else
set-variable #l1 &spr "%s%n" #l0 &sub 3 #l1 "~"
!endif
!elif $kept-versions
set-variable #l1 &cat #l0 ".~0~"
!else
set-variable #l1 &cat #l0 "~"
!endif
NOTES
UNIX X verses Termcap
By default, on X supporting systems MicroEmacs creates a new X window. This feature may be disabled in one of two ways:
- The environment variable $TERM is set to "vt...", in this case it is assumed that the machine is a server, and the host cannot support X.
- The -n option is used on the command line (see
me(1)) to disable the windowing interface.
If X is disabled then the termcap interface is used instead, still allowing the use of colors through the ANSI standard, or the use of fonts (see bits 0x004 and 0x008).
X provides the following features over and above a termcap based version of MicroEmacs '99:
- R,G,B style color creator giving access to up to 256 different colors for the ultimate hilighting schemes (see bit 0x002 and
add-color(2)).
- Full mouse support, allowing user definable bindings to every mouse event (see
global-bind-key(2)).
- Copy from and pasting to X's selection buffer (see
yank(2)).
SEE ALSO
(c) Copyright JASSPA 1999
Last Modified: 1999/04/24
Generated On: 1999/12/01