diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-08-09 08:01:07 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-08-09 08:01:07 +0000 |
commit | d1ae737bff663a1af393ea5ba16a1b0fc9b476a9 (patch) | |
tree | f94f87946d4bd4f7ba98703eb5c5464aa7e99ea6 /lisp/format.el | |
parent | 4bbc4094c4be498498aa0859a261b441c575f019 (diff) | |
download | emacs-d1ae737bff663a1af393ea5ba16a1b0fc9b476a9.tar.gz |
(format-alist): Doc fix.
Diffstat (limited to 'lisp/format.el')
-rw-r--r-- | lisp/format.el | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/format.el b/lisp/format.el index 237c7b2964e..9a74869be86 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -106,25 +106,36 @@ iso-spanish iso-cvt-read-only t nil)) "List of information about understood file formats. Elements are of the form \(NAME DOC-STR REGEXP FROM-FN TO-FN MODIFY MODE-FN). + NAME is a symbol, which is stored in `buffer-file-format'. + DOC-STR should be a single line providing more information about the format. It is currently unused, but in the future will be shown to the user if they ask for more information. + REGEXP is a regular expression to match against the beginning of the file; it should match only files in that format. + FROM-FN is called to decode files in that format; it gets two args, BEGIN and END, and can make any modifications it likes, returning the new end. It must make sure that the beginning of the file no longer matches REGEXP, or else it will get called again. + Alternatively, FROM-FN can be a string, which specifies a shell command + (including options) to be used as a filter to perform the conversion. + TO-FN is called to encode a region into that format; it is passed three arguments: BEGIN, END, and BUFFER. BUFFER is the original buffer that the data being written came from, which the function could use, for example, to find the values of local variables. TO-FN should either return a list of annotations like `write-region-annotate-functions', or modify the region and return the new end. + Alternatively, TO-FN can be a string, which specifies a shell command + (including options) to be used as a filter to perform the conversion. + MODIFY, if non-nil, means the TO-FN wants to modify the region. If nil, TO-FN will not make any changes but will instead return a list of annotations. + MODE-FN, if specified, is called when visiting a file with that format.") ;;; Basic Functions (called from Lisp) |