diff options
| author | Andrew Hyatt | 2016-07-24 23:58:47 -0400 |
|---|---|---|
| committer | Andrew Hyatt | 2016-07-25 21:31:48 -0400 |
| commit | 113b3852d7a51e25ec765f80a265dac0bf8fe66e (patch) | |
| tree | 4dee292973fe66126a0330c0b442e5289dfba0b8 | |
| parent | 520522674e501f5a3517323b5751a04c58582c65 (diff) | |
| download | emacs-113b3852d7a51e25ec765f80a265dac0bf8fe66e.tar.gz emacs-113b3852d7a51e25ec765f80a265dac0bf8fe66e.zip | |
Add warning to format-alist docs.
*/doc/lispref/files.texi (format-alist) Change documentation for
format-alist to warn against file modifications when formatting, which
leads to incorrect results. (Bug#5440)
Changes suggested by Eli.
| -rw-r--r-- | doc/lispref/files.texi | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index f3650a4556f..ea9d53b0ea6 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -3238,7 +3238,9 @@ end position. | |||
| 3238 | 3238 | ||
| 3239 | One responsibility of @var{from-fn} is to make sure that the beginning | 3239 | One responsibility of @var{from-fn} is to make sure that the beginning |
| 3240 | of the file no longer matches @var{regexp}. Otherwise it is likely to | 3240 | of the file no longer matches @var{regexp}. Otherwise it is likely to |
| 3241 | get called again. | 3241 | get called again. Also, @var{from-fn} must not involve buffers or |
| 3242 | files other than the one being decoded, otherwise the internal buffer | ||
| 3243 | used for formatting might be overwritten. | ||
| 3242 | 3244 | ||
| 3243 | @item to-fn | 3245 | @item to-fn |
| 3244 | A shell command or function to encode data in this format---that is, to | 3246 | A shell command or function to encode data in this format---that is, to |
| @@ -3269,6 +3271,10 @@ file, it intermixes the specified annotations at the corresponding | |||
| 3269 | positions. All this takes place without modifying the buffer. | 3271 | positions. All this takes place without modifying the buffer. |
| 3270 | @end itemize | 3272 | @end itemize |
| 3271 | 3273 | ||
| 3274 | @var{to-fn} must not involve buffers or files other than the one being | ||
| 3275 | encoded, otherwise the internal buffer used for formatting might be | ||
| 3276 | overwritten. | ||
| 3277 | |||
| 3272 | @item modify | 3278 | @item modify |
| 3273 | A flag, @code{t} if the encoding function modifies the buffer, and | 3279 | A flag, @code{t} if the encoding function modifies the buffer, and |
| 3274 | @code{nil} if it works by returning a list of annotations. | 3280 | @code{nil} if it works by returning a list of annotations. |