aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-08-02 17:33:15 +0300
committerEli Zaretskii2025-08-02 17:33:15 +0300
commit477335a10ba6d91dc1600b2a05ea202d4b851417 (patch)
tree21df3b71da267d2f6bd0260b5dffe8ee7fa56485
parent9e3720bbb116193c7866ae04d35afa34f5451fa6 (diff)
downloademacs-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.texi10
-rw-r--r--lisp/files.el4
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
149creates a new buffer and reads the file into it. When 149creates 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
151that the file has not changed since it was last visited or saved in 151that the file has not changed since it was last visited or saved in
152that buffer. If the file has changed, this function asks the user 152that buffer (unless @var{nowarn} is non-@code{nil}, see below). If the
153whether to reread the changed file. If the user says @samp{yes}, any 153file has changed, this function asks the user whether to reread the
154edits previously made in the buffer are lost. 154changed file. If the user says @samp{yes}, any edits previously made in
155the buffer are lost.
155 156
156Reading the file involves decoding the file's contents (@pxref{Coding 157Reading the file involves decoding the file's contents (@pxref{Coding
157Systems}), including end-of-line conversion, and format conversion 158Systems}), including end-of-line conversion, and format conversion
@@ -163,7 +164,8 @@ This function displays warning or advisory messages in various peculiar
163cases, unless the optional argument @var{nowarn} is non-@code{nil}. For 164cases, unless the optional argument @var{nowarn} is non-@code{nil}. For
164example, if it needs to create a buffer, and there is no file named 165example, 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
166area, and leaves the buffer empty. 167area, and leaves the buffer empty. The verification of the file's last
168change is also bypassed if @var{nowarn} is non-@code{nil}.
167 169
168The @code{find-file-noselect} function normally calls 170The @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."
2502If a buffer exists visiting FILENAME, return that one, but 2502If a buffer exists visiting FILENAME, return that one, but
2503verify that the file has not changed since visited or saved. 2503verify that the file has not changed since visited or saved.
2504The buffer is not selected, just returned to the caller. 2504The buffer is not selected, just returned to the caller.
2505Optional second arg NOWARN non-nil means suppress any warning messages. 2505Optional second arg NOWARN non-nil means suppress any warning messages,
2506and also don't verify the that the file has not been changed since
2507last visited or saved.
2506Optional third arg RAWFILE non-nil means the file is read literally. 2508Optional third arg RAWFILE non-nil means the file is read literally.
2507Optional fourth arg WILDCARDS non-nil means do wildcard processing 2509Optional fourth arg WILDCARDS non-nil means do wildcard processing
2508and visit all the matching files. When wildcards are actually 2510and visit all the matching files. When wildcards are actually