The $system is used to define and configure the MicroEmacs environment, it is a bit based flag where:-
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.
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.
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.
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.
If this bit is set then the current system supports the use of fonts (bold, italic, light and underline). Whether these fonts can be successfully utilized depends upon the platform and the system font being used, for UNIX TERMCAP systems it will also depend on the terminal being used. This option is not supported on MS_DOS.
When this bit is set the cursor is always shown in OSD (main menu) dialogs, this helps to improve navigation of dialogs ion systems with limited colors.
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.
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.
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.
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.
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.
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 has an
indentation method. If the bit is clear then the tab may only checks the indentation when the cursor is in column zero depending on the setting of bit 0x200000.
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.
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.
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.
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:
Special Character; Backspace
Box Character; Bottom right
Box Character; Bottom left
Box Character; Center cross
Box Character; Horizontal line
Box Character; Bottom Tee
Box Character; Vertical Line
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.
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.
Enables the drawing of visible white spaces, i.e. space, tab and new-line characters. When disabled (default) white spaces are drawn using spaces (' ') which means the user cannot distinguish between a tab and spaces or determine the last character of the line by merely looking at the display. When enabled MicroEmacs uses visible characters to draw the white spaces, the characters used are set with the variable
Enables hiding MicroEmacs generated backup files. On Windows and Dos platforms the Hidden file attribute is used to hide the file, whereas on UNIX the backup file name is prepended with a '.'.
If this bit set, the then execution of the
tab(2) command (bound to tab) checks and adjusts the indentation of the current line when the cursor is in column zero and current buffer has an
indentation method. The setting of this bit has no effect if bit 0x1000 is set. If this and bit 0x1000 are clear then the tab will not check the indentation.
When this bit is set the external clipboard (Windows & XTerm platforms) will never be set to empty, if the current yank buffer is the empty string the cut buffer will be set to a space (i.e. " "). This feature has been added to avoid problems with other software (e.g. exceed(1) which can crash if given an empty cut buffer).
When this bit is set all use of the external clipboard (Windows & XTerm platforms) is disabled, this means that MicroEmacs will not attempt to retrieve or set the content of the system clipboard.
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 "~"
set-variable #l1 &spr "%s%n" #l0 &sub 3 #l1 "~"
set-variable #l1 &cat #l0 ".~0~"
set-variable #l1 &cat #l0 "~"
The following macro can be used to toggle the visible drawing of white spaces:
set-variable $system &bxor $system 0x80000
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 '06:
- R,G,B style color creator giving access to up to 256 different colors for the ultimate hilighting schemes (see bit 0x002 and
- Full mouse support, allowing user definable bindings to every mouse event (see
- Copy from and pasting to X's selection buffer (see
Copyright (c) 1998-2006 JASSPA
Last Modified: 2005/01/16
Generated On: 2006/10/07