on-save-file in text:clever-file-format-mixin
Called just before the editor is saved to a file, after calling
can-save-file? to verify that the save is allowed. See also
after-save-file.
( -> void
send a-text:clever-file-format-mixin on-save-file filename format)
filename : string
format : symbol in '(guess standard text text-force-cr same copy)
The filename argument is the name the file will be saved
to. See
load-file for information about format.
If the method
get-file-format returns 'standard and the text has only
string-snip%s, the file format is set to 'text.
If the method
get-file-format returns 'text and the text has some non
string-snip%s, the file format is set to 'standard.
Depending on the user's preferences, the user may also be queried.
Also, the chagnes to the file format only happen if the argument
file-format is 'copy or 'same.