aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-08-09 08:01:07 +0000
committerRichard M. Stallman1997-08-09 08:01:07 +0000
commitd1ae737bff663a1af393ea5ba16a1b0fc9b476a9 (patch)
treef94f87946d4bd4f7ba98703eb5c5464aa7e99ea6
parent4bbc4094c4be498498aa0859a261b441c575f019 (diff)
downloademacs-d1ae737bff663a1af393ea5ba16a1b0fc9b476a9.tar.gz
emacs-d1ae737bff663a1af393ea5ba16a1b0fc9b476a9.zip
(format-alist): Doc fix.
-rw-r--r--lisp/format.el11
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 @@
106 iso-spanish iso-cvt-read-only t nil)) 106 iso-spanish iso-cvt-read-only t nil))
107 "List of information about understood file formats. 107 "List of information about understood file formats.
108Elements are of the form \(NAME DOC-STR REGEXP FROM-FN TO-FN MODIFY MODE-FN). 108Elements are of the form \(NAME DOC-STR REGEXP FROM-FN TO-FN MODIFY MODE-FN).
109
109NAME is a symbol, which is stored in `buffer-file-format'. 110NAME is a symbol, which is stored in `buffer-file-format'.
111
110DOC-STR should be a single line providing more information about the 112DOC-STR should be a single line providing more information about the
111 format. It is currently unused, but in the future will be shown to 113 format. It is currently unused, but in the future will be shown to
112 the user if they ask for more information. 114 the user if they ask for more information.
115
113REGEXP is a regular expression to match against the beginning of the file; 116REGEXP is a regular expression to match against the beginning of the file;
114 it should match only files in that format. 117 it should match only files in that format.
118
115FROM-FN is called to decode files in that format; it gets two args, BEGIN 119FROM-FN is called to decode files in that format; it gets two args, BEGIN
116 and END, and can make any modifications it likes, returning the new 120 and END, and can make any modifications it likes, returning the new
117 end. It must make sure that the beginning of the file no longer 121 end. It must make sure that the beginning of the file no longer
118 matches REGEXP, or else it will get called again. 122 matches REGEXP, or else it will get called again.
123 Alternatively, FROM-FN can be a string, which specifies a shell command
124 (including options) to be used as a filter to perform the conversion.
125
119TO-FN is called to encode a region into that format; it is passed three 126TO-FN is called to encode a region into that format; it is passed three
120 arguments: BEGIN, END, and BUFFER. BUFFER is the original buffer that 127 arguments: BEGIN, END, and BUFFER. BUFFER is the original buffer that
121 the data being written came from, which the function could use, for 128 the data being written came from, which the function could use, for
122 example, to find the values of local variables. TO-FN should either 129 example, to find the values of local variables. TO-FN should either
123 return a list of annotations like `write-region-annotate-functions', 130 return a list of annotations like `write-region-annotate-functions',
124 or modify the region and return the new end. 131 or modify the region and return the new end.
132 Alternatively, TO-FN can be a string, which specifies a shell command
133 (including options) to be used as a filter to perform the conversion.
134
125MODIFY, if non-nil, means the TO-FN wants to modify the region. If nil, 135MODIFY, if non-nil, means the TO-FN wants to modify the region. If nil,
126 TO-FN will not make any changes but will instead return a list of 136 TO-FN will not make any changes but will instead return a list of
127 annotations. 137 annotations.
138
128MODE-FN, if specified, is called when visiting a file with that format.") 139MODE-FN, if specified, is called when visiting a file with that format.")
129 140
130;;; Basic Functions (called from Lisp) 141;;; Basic Functions (called from Lisp)