on-save-file (augments, and augmentable only) 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.
(voidsenda-text:clever-file-format-mixinon-save-filefilenameformat
filename: path
format: symbol in'(guess standard text text-force-cr same copy)If the method
get-file-formatreturns'standardand the text has onlystring-snip%s, the file format is set to'text.If the method
get-file-formatreturns'textand the text has some nonstring-snip%s, the file format is set to'standard.Depending on the user's preferences, the user may also be queried.
Also, the changes to the file format only happen if the argument
file-formatis'copyor'same.