diff options
| author | Eli Zaretskii | 2025-08-02 17:33:15 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-08-02 17:33:15 +0300 |
| commit | 477335a10ba6d91dc1600b2a05ea202d4b851417 (patch) | |
| tree | 21df3b71da267d2f6bd0260b5dffe8ee7fa56485 | |
| parent | 9e3720bbb116193c7866ae04d35afa34f5451fa6 (diff) | |
| download | emacs-477335a10ba6d91dc1600b2a05ea202d4b851417.tar.gz emacs-477335a10ba6d91dc1600b2a05ea202d4b851417.zip | |
; Fix documentation of 'find-file-noselect'
* doc/lispref/files.texi (Visiting Functions):
* lisp/files.el (find-file-noselect): Document that NOWARN non-nil
also bypasses the file's last change verification. (Bug#79127)
| -rw-r--r-- | doc/lispref/files.texi | 10 | ||||
| -rw-r--r-- | lisp/files.el | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index c285cd1c683..d69bc46cd2c 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi | |||
| @@ -149,9 +149,10 @@ The function returns an existing buffer if there is one; otherwise it | |||
| 149 | creates a new buffer and reads the file into it. When | 149 | creates a new buffer and reads the file into it. When |
| 150 | @code{find-file-noselect} uses an existing buffer, it first verifies | 150 | @code{find-file-noselect} uses an existing buffer, it first verifies |
| 151 | that the file has not changed since it was last visited or saved in | 151 | that the file has not changed since it was last visited or saved in |
| 152 | that buffer. If the file has changed, this function asks the user | 152 | that buffer (unless @var{nowarn} is non-@code{nil}, see below). If the |
| 153 | whether to reread the changed file. If the user says @samp{yes}, any | 153 | file has changed, this function asks the user whether to reread the |
| 154 | edits previously made in the buffer are lost. | 154 | changed file. If the user says @samp{yes}, any edits previously made in |
| 155 | the buffer are lost. | ||
| 155 | 156 | ||
| 156 | Reading the file involves decoding the file's contents (@pxref{Coding | 157 | Reading the file involves decoding the file's contents (@pxref{Coding |
| 157 | Systems}), including end-of-line conversion, and format conversion | 158 | Systems}), including end-of-line conversion, and format conversion |
| @@ -163,7 +164,8 @@ This function displays warning or advisory messages in various peculiar | |||
| 163 | cases, unless the optional argument @var{nowarn} is non-@code{nil}. For | 164 | cases, unless the optional argument @var{nowarn} is non-@code{nil}. For |
| 164 | example, if it needs to create a buffer, and there is no file named | 165 | example, if it needs to create a buffer, and there is no file named |
| 165 | @var{filename}, it displays the message @samp{(New file)} in the echo | 166 | @var{filename}, it displays the message @samp{(New file)} in the echo |
| 166 | area, and leaves the buffer empty. | 167 | area, and leaves the buffer empty. The verification of the file's last |
| 168 | change is also bypassed if @var{nowarn} is non-@code{nil}. | ||
| 167 | 169 | ||
| 168 | The @code{find-file-noselect} function normally calls | 170 | The @code{find-file-noselect} function normally calls |
| 169 | @code{after-find-file} after reading the file (@pxref{Subroutines of | 171 | @code{after-find-file} after reading the file (@pxref{Subroutines of |
diff --git a/lisp/files.el b/lisp/files.el index c288a5a8b26..6544ee54ee4 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2502,7 +2502,9 @@ be visible in the echo area." | |||
| 2502 | If a buffer exists visiting FILENAME, return that one, but | 2502 | If a buffer exists visiting FILENAME, return that one, but |
| 2503 | verify that the file has not changed since visited or saved. | 2503 | verify that the file has not changed since visited or saved. |
| 2504 | The buffer is not selected, just returned to the caller. | 2504 | The buffer is not selected, just returned to the caller. |
| 2505 | Optional second arg NOWARN non-nil means suppress any warning messages. | 2505 | Optional second arg NOWARN non-nil means suppress any warning messages, |
| 2506 | and also don't verify the that the file has not been changed since | ||
| 2507 | last visited or saved. | ||
| 2506 | Optional third arg RAWFILE non-nil means the file is read literally. | 2508 | Optional third arg RAWFILE non-nil means the file is read literally. |
| 2507 | Optional fourth arg WILDCARDS non-nil means do wildcard processing | 2509 | Optional fourth arg WILDCARDS non-nil means do wildcard processing |
| 2508 | and visit all the matching files. When wildcards are actually | 2510 | and visit all the matching files. When wildcards are actually |