home *** CD-ROM | disk | FTP | other *** search
- ; LOAD.E Bryan Lewis 1/2/89
- ;
- ; This event is triggered immediately after a file is loaded. It will be
- ; invoked after loading an existing file from disk, or opening a new file,
- ; but not after an error such as "Not enough memory".
- ; In other words, a new file must be entered into the ring.
- ;
- ; This is the place to select a keyset (like c_keys for .C files) since
- ; keysets now stay bound to a file once assigned.
- ; This is also a good place to do other one-time processing like returning to
- ; a saved bookmark.
- ;
- ; No argument is passed. Check .filename if you want the name of the file.
- ; Use the function filetype() for the filetype.
- ; 1993/01/07: put the result of filetype() in a universal so others needn't call it.
- defload
- universal load_ext
- compile if WANT_EBOOKIE = 'DYNALINK'
- universal bkm_avail
- compile endif
- compile if EPM
- universal vDEFAULT_TABS, vDEFAULT_MARGINS, vDEFAULT_AUTOSAVE, load_var
- compile if EVERSION >= '5.50'
- universal default_font
- compile endif
- compile if WANT_LONGNAMES='SWITCH'
- universal SHOW_LONGNAMES
- compile endif
-
- load_var = 0
-
- .tabs = vDEFAULT_TABS
- .margins = vDEFAULT_MARGINS
- .autosave = vDEFAULT_AUTOSAVE
- compile if EVERSION < 5.21
- .statusline=STATUS_TEMPLATE
- compile endif
- compile if WANT_LONGNAMES
- compile if WANT_LONGNAMES='SWITCH'
- if SHOW_LONGNAMES then
- compile endif
- longname = get_EAT_ASCII_value('.LONGNAME')
- if longname<>'' then
- filepath = leftstr(.filename, lastpos('\',.filename))
- .titletext = filepath || longname
- endif
- compile if WANT_LONGNAMES='SWITCH'
- endif
- compile endif
- compile endif
- compile else
- .tabs = DEFAULT_TABS
- .margins = DEFAULT_MARGINS
- .autosave = DEFAULT_AUTOSAVE
- compile endif
- load_ext = filetype()
- keys edit_keys -- defaults for non-special filetypes
- compile if EVERSION >= '5.50'
- if .font < 2 then -- If being called from a NAME, and font was set, don't change it.
- .font = default_font
- endif
- compile endif
- compile if WANT_BOOKMARKS
- if .levelofattributesupport < 2 then -- If not already set (e.g., NAME does a DEFLOAD)
- 'loadattributes'
- endif
- compile endif
- compile if WANT_EBOOKIE
- compile if WANT_EBOOKIE = 'DYNALINK'
- if bkm_avail <> '' then
- compile endif
- if bkm_defload()<>0 then keys bkm_keys; endif
- compile if WANT_EBOOKIE = 'DYNALINK'
- endif
- compile endif
- compile endif -- WANT_EBOOKIE
- compile if INCLUDE_BMS_SUPPORT
- if isadefproc('BMS_defload_exit') then
- call BMS_defload_exit()
- endif
- compile endif
- -- sayerror 'DEFLOAD occurred for file '.filename'.' -- for testing
-