diff options
| author | Richard M. Stallman | 2004-12-31 15:04:13 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-12-31 15:04:13 +0000 |
| commit | c4f197308179d827ca0746748006ff6e1b6ea15e (patch) | |
| tree | 37a07671ef59b04c380bf8a8491c3c320b236813 | |
| parent | 706d2537e153d963d9e42efc66fc29034a35f80c (diff) | |
| download | emacs-c4f197308179d827ca0746748006ff6e1b6ea15e.tar.gz emacs-c4f197308179d827ca0746748006ff6e1b6ea15e.zip | |
(Saving): Describe new require-final-newline features
and mode-require-final-newline.
| -rw-r--r-- | man/files.texi | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/man/files.texi b/man/files.texi index c556ec00aea..8494ea8dc52 100644 --- a/man/files.texi +++ b/man/files.texi | |||
| @@ -464,12 +464,23 @@ by simultaneous editing and requires your immediate attention. | |||
| 464 | @xref{Interlocking,, Simultaneous Editing}. | 464 | @xref{Interlocking,, Simultaneous Editing}. |
| 465 | 465 | ||
| 466 | @vindex require-final-newline | 466 | @vindex require-final-newline |
| 467 | If the value of the variable @code{require-final-newline} is @code{t}, | 467 | If the value of the variable @code{require-final-newline} is |
| 468 | Emacs silently puts a newline at the end of any file that doesn't | 468 | @code{t}, Emacs silently puts a newline at the end of any file that |
| 469 | already end in one, every time a file is saved or written. If the value | 469 | doesn't already end in one, every time a file is saved or written. If |
| 470 | is @code{nil}, Emacs leaves the end of the file unchanged; if it's | 470 | the value is @code{visit}, Emacs adds a newline at the end of any file |
| 471 | neither @code{nil} nor @code{t}, Emacs asks you whether to add a | 471 | that doesn't have one, just after it visits the file. (This marks the |
| 472 | newline. The default is @code{nil}. | 472 | buffer as modified, and you can undo it.) If the value is |
| 473 | @code{visit-save}, that means to add newlines both on visiting and on | ||
| 474 | saving. If the value is @code{nil}, Emacs leaves the end of the file | ||
| 475 | unchanged; if it's neither @code{nil} nor @code{t}, Emacs asks you | ||
| 476 | whether to add a newline. The default is @code{nil}. | ||
| 477 | |||
| 478 | @vindex mode-require-final-newline | ||
| 479 | Many major modes are designed for specific kinds of files that are | ||
| 480 | always supposed to end in newlines. These major modes set the | ||
| 481 | variable @code{require-final-newline} according to | ||
| 482 | @code{mode-require-final-newline}. By setting the latter variable, | ||
| 483 | you can control how these modes handle final newlines. | ||
| 473 | 484 | ||
| 474 | @menu | 485 | @menu |
| 475 | * Backup:: How Emacs saves the old version of your file. | 486 | * Backup:: How Emacs saves the old version of your file. |