diff options
| author | Glenn Morris | 2008-12-02 03:31:40 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-12-02 03:31:40 +0000 |
| commit | 84da0f1790010a8824c1932ab23fdaafd6e0a26c (patch) | |
| tree | afccd81bf453d18247df9c65984c5d8ee1dfe13a | |
| parent | 1097333f20f850118b8406118c8bf14aa52c2997 (diff) | |
| download | emacs-84da0f1790010a8824c1932ab23fdaafd6e0a26c.tar.gz emacs-84da0f1790010a8824c1932ab23fdaafd6e0a26c.zip | |
(format-write-file): Rewrite doc yet again.
| -rw-r--r-- | lisp/format.el | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lisp/format.el b/lisp/format.el index 77ab5e952b0..45d6fa2a3af 100644 --- a/lisp/format.el +++ b/lisp/format.el | |||
| @@ -359,20 +359,20 @@ one of the formats defined in `format-alist', or a list of such symbols." | |||
| 359 | (setq format (cdr format))))))) | 359 | (setq format (cdr format))))))) |
| 360 | 360 | ||
| 361 | (defun format-write-file (filename format &optional confirm) | 361 | (defun format-write-file (filename format &optional confirm) |
| 362 | "Write current buffer into file FILENAME using some FORMAT. | 362 | "Write current buffer into FILENAME, using a format based on FORMAT. |
| 363 | Make buffer visit that file and set the format as the default for future | 363 | Constructs the actual format starting from FORMAT, then appending |
| 364 | saves (see below). If the buffer is already visiting a file, you can | 364 | any elements from the value of `buffer-file-format' with a non-nil |
| 365 | specify a directory name as FILENAME, to write a file of the same old name | 365 | `preserve' flag (see the documentation of `format-alist'), if they |
| 366 | are not already present in FORMAT. It then updates `buffer-file-format' | ||
| 367 | with this format, making it the default for future saves. | ||
| 368 | |||
| 369 | If the buffer is already visiting a file, you can specify a | ||
| 370 | directory name as FILENAME, to write a file of the same old name | ||
| 366 | in that directory. | 371 | in that directory. |
| 367 | 372 | ||
| 368 | If optional third arg CONFIRM is non-nil, ask for confirmation before | 373 | If optional third arg CONFIRM is non-nil, asks for confirmation before |
| 369 | overwriting an existing file. Interactively, confirmation is required | 374 | overwriting an existing file. Interactively, requires confirmation |
| 370 | unless you supply a prefix argument. | 375 | unless you supply a prefix argument." |
| 371 | |||
| 372 | This function sets the buffer-local value of `buffer-file-format' | ||
| 373 | to FORMAT, then appends any elements from the previous value with | ||
| 374 | a non-nil `preserve' flag (see the documentation of `format-alist'), | ||
| 375 | if they are not already present in the new value." | ||
| 376 | (interactive | 376 | (interactive |
| 377 | ;; Same interactive spec as write-file, plus format question. | 377 | ;; Same interactive spec as write-file, plus format question. |
| 378 | (let* ((file (if buffer-file-name | 378 | (let* ((file (if buffer-file-name |