$platform - MicroEmacs host platform identifier
%platform - MicroEmacs host platform type identifier
$platform "string"; Default is platform specific
%platform "string"; Default is platform specific
The $platform variable is a fixed ASCII string used to identify the current working platform, attempts to set this variable result in an error returned from set-variable(2).
Possible values are:
"aix"
"dos"
"freebsd"
"hpux"
"irix"
"linux"
"sunos"
"unixwr1"
"win32"
$platform is often used in .emf files to allow portability of macro files across platforms, allowing macro files to perform platform specific operations. $system(5) is also often used for this purpose as its value is easier to assess.
%platform is created at start-up when me.emf is executed, its value is identical to $platform except when the platform is a console in which case a 'c' is appended to the $platform value, e.g. for MicroEmacs running a termcap version on LINUX the value will be "linuxc". The variable is used when the console and window based versions need to be distinguish, e.g. some of the user-setup settings.
The following example is taken from the me.emf file which uses the $platform variable to load the platform specific initialization files.
; ; load in the platform specific stuff execute-file $platform
This could be more explicitly done by:
; ; load in the platform specific stuff !if &seq $platform "dos" ; is it an IBM-PC running dos ? execute-file "dos" !elif &seq $platform "irix" ; is it an sgi ? execute-file "irix" !elif &seq $platform "hpux" ; is it an hp ? execute-file "hpux" . . !endif
The $platform variable can not be set. Any attempt to set it will result in an error.
(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12