1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

; 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)
This commit is contained in:
Eli Zaretskii 2025-08-02 17:33:15 +03:00
parent 9e3720bbb1
commit 477335a10b
2 changed files with 9 additions and 5 deletions

View file

@ -149,9 +149,10 @@ The function returns an existing buffer if there is one; otherwise it
creates a new buffer and reads the file into it. When
@code{find-file-noselect} uses an existing buffer, it first verifies
that the file has not changed since it was last visited or saved in
that buffer. If the file has changed, this function asks the user
whether to reread the changed file. If the user says @samp{yes}, any
edits previously made in the buffer are lost.
that buffer (unless @var{nowarn} is non-@code{nil}, see below). If the
file has changed, this function asks the user whether to reread the
changed file. If the user says @samp{yes}, any edits previously made in
the buffer are lost.
Reading the file involves decoding the file's contents (@pxref{Coding
Systems}), including end-of-line conversion, and format conversion
@ -163,7 +164,8 @@ This function displays warning or advisory messages in various peculiar
cases, unless the optional argument @var{nowarn} is non-@code{nil}. For
example, if it needs to create a buffer, and there is no file named
@var{filename}, it displays the message @samp{(New file)} in the echo
area, and leaves the buffer empty.
area, and leaves the buffer empty. The verification of the file's last
change is also bypassed if @var{nowarn} is non-@code{nil}.
The @code{find-file-noselect} function normally calls
@code{after-find-file} after reading the file (@pxref{Subroutines of

View file

@ -2502,7 +2502,9 @@ be visible in the echo area."
If a buffer exists visiting FILENAME, return that one, but
verify that the file has not changed since visited or saved.
The buffer is not selected, just returned to the caller.
Optional second arg NOWARN non-nil means suppress any warning messages.
Optional second arg NOWARN non-nil means suppress any warning messages,
and also don't verify the that the file has not been changed since
last visited or saved.
Optional third arg RAWFILE non-nil means the file is read literally.
Optional fourth arg WILDCARDS non-nil means do wildcard processing
and visit all the matching files. When wildcards are actually