emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4f851c2: ; Improve documentation of a recent change


From: Eli Zaretskii
Subject: master 4f851c2: ; Improve documentation of a recent change
Date: Tue, 2 Nov 2021 11:09:38 -0400 (EDT)

branch: master
commit 4f851c2357cb8a09024432f2c6e061907311ce43
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    ; Improve documentation of a recent change
    
    * lisp/files.el (file-has-changed-p): TAG must be a symbol.
    
    * doc/lispref/files.texi (File Attributes): Fix typos.
---
 doc/lispref/files.texi | 13 +++++++------
 lisp/files.el          | 14 +++++++-------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 84da6eb..24f059e 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1318,13 +1318,14 @@ on the 19th, @file{aug-20} was written on the 20th, and 
the file
 This function returns non-@code{nil} if the time stamp of
 @var{filename} has changed since the last call.  When called for the
 first time for some @var{filename}, it records the last modification
-time ans size of the file and returns non-@code{nil}.  Thereafter,
+time and size of the file, and returns non-@code{nil}.  Thereafter,
 when called for the same @var{filename}, it compares the current time
-stamp and size with the recorded one and returns non-@code{nil} only
-if they are different.  This is useful when a Lisp program wants to
-re-read a file whenever it changes.  With an optional argument
-@var{tag}, the size and modification time comparisons are limited to
-calls with the same tag.
+stamp and size with the recorded ones, and returns non-@code{nil} only
+if either the time stamp or the size (or both) are different.  This is
+useful when a Lisp program wants to re-read a file whenever it
+changes.  With an optional argument @var{tag}, which must be a symbol,
+the size and modification time comparisons are limited to calls with
+the same tag.
 @end defun
 
 @defun file-attributes filename &optional id-format
diff --git a/lisp/files.el b/lisp/files.el
index d7dfa93..173198a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6186,13 +6186,13 @@ Return nil if DIR is not an existing directory."
 
 (defun file-has-changed-p (file &optional tag)
   "Return non-nil if FILE has changed.
-The size and modification time of FILE is compared to the size
-and modification time of FILE during a previous invocation of
-`file-has-changed-p'.  Therefore the first invocation of
-`file-has-changed-p' always returns non-nil.
-The optional argument TAG can be used to limit the comparison to
-invocations with identical tags; it can for example be the symbol
-of the calling function."
+The size and modification time of FILE are compared to the size
+and modification time of tghe same FILE during a previous
+invocation of `file-has-changed-p'.  Thus, the first invocation
+of `file-has-changed-p' always returns non-nil.
+The optional argument TAG, which must be a symbol, can be used to
+limit the comparison to invocations with identical tags; it can be
+the symbol of the calling function, for example."
   (let* ((fileattr (file-attributes file 'integer))
         (attr (cons (file-attribute-size fileattr)
                     (file-attribute-modification-time fileattr)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]