** see INITIAL.KEX for details (PROFILE.KEX kept in memory) 'editv get INITIAL.0' /* read variable INITIAL.0 */ if INITIAL.0 = '' then do /* if INITIAL.0 undefined: */ 'macro INITIAL' /* use INITIAL.KEX to set */ 'editv get INITIAL.0' /* new INITIAL.0 count of */ end /* unusual local defaults */ do N = 1 to INITIAL.0 /* including initial ATTRs */ 'editv get INITIAL.' || N 'set' INITIAL.N ; if rc <> 0 then exit rc end do ; if TYPE( 'KML REX NRX' ) then do 'eolout lf' ; 'tabs incr 3' ; 'eofin prevent' end /* UNIX lineends, EOF = LF */ else if TYPE( 'CMD BAT KEX PMG ZRX' ) then do 'tabsin off' ; 'tabs incr 3' ; 'eofout eoleof' 'backup off' ; 'eapreserve critical' end /* preserve crit. OS/2 EAs */ else if TYPE( 'SYS INI' ) then do 'tabsin off' ; 'eofout eoleof' end /* DOS lineends, EOF char. */ else if TYPE( 'S SH ASM INC NMK' ) then do 'eolout lf' end /* UNIX lineends, EOF = LF */ else if TYPE( 'AWK C H CPP HPP' ) then do 'eolout lf' ; 'tabs incr 5' end /* indent cuddled up else_ */ else if TYPE( 'JS PAC' ) | NAME( 'COOKIES' ) then do 'eofin allow' ; 'tabsin off' ; 'eolin lf' 'eolout crlf' ; 'eofout none' end /* weird netscape lineends */ else if NAME( 'CTAGS TAGS KTAGS' ) then do 'eolout lf' ; 'tabsin off' end /* do not expand tags TABs */ else if FILE( 'SENDMAIL.UML SENDMAIL.CF SORT.DAT' ) then do 'tabsin off' end /* weird sendmail.cf TABs */ else if FILE( 'DIR MAKEFILE' ) then do 'eolout lf' ; 'tabsin off' ; 'arbchar off' end /* TeX makeinfo DIR node */ end /* or GNU makefile tab :-( */ if dir() | FILE( 'MACROS.KML' ) then do 'forward half' ; exit rc end /* in *.DIR or MACROS.KML */ N = ' [Help] [Lock] [Save] [Quit]' 'mousetext user [Move] [Copy] [Delete] [Undo] [Redo]' N if opmode.1() = 'REAL' then 'undoing on 200 256' else 'undoing on 1000 1000' 'extract /LASTMSG/' ; 'refresh' N = '[Alt]+[H] shows key definitions' if rexx.0() = 0 then N = N || ', REXX not accessible' if initial() then say N ; else 'macro status' 'nomsg msg' LASTMSG.1 /* sanity: reset error msg */ exit rc TYPE: return sign( wordpos( ft.1(), arg( 1 ))) NAME: return sign( wordpos( fn.1(), arg( 1 ))) FILE: return sign( wordpos( fn.1() || '.' || ft.1(), arg( 1 )))