load-file in editor<%>
Loads a file into the editor and returns #t. If an error
occurs, an exception is raised.
The filename used to load the file can be retrieved with
get-filename. For a text% instance, the format can be
retrieved with
get-file-format.
See also
on-load-file,
after-load-file,
can-load-file?, and
set-load-overwrites-styles.
( -> boolean
send an-editor load-file filename format show-errors?)
filename = : string or #f#f
format = : symbol in 'guess'(guess standard text text-force-cr same copy)
show-errors? = : boolean#t
If filename is #f, then the
internally stored filename will be used; if filename is "" or
if the internal name is unset or temporary, then the user will be
prompted for a name.
The possible values for format are listed below. A single set of
format values are used for loading and saving files:
'guess -- guess the format based on
extension and/or contents; when saving a file, this is the same as
'standard
'standard -- read/write a standard file (binary format)
'text -- read/write a text file (text% only)
'text-force-cr -- read/write a text
file (text% only); when writing, change automatic
newlines (from word-wrapping) into real carriage returns
'same -- read in whatever format was last loaded or saved
'copy -- write using whatever
format was last loaded or saved, but do not change the modification
flag or remember filename (saving only)
In a text% instance, the format returned from
get-file-format is always one of 'standard,
'text, or
'text-force-cr.
The show-errors? argument is no longer used.