[Top][All Lists]

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

[Emacs-diffs] master 9597ee6: Out-of-datedness .elc check is merely a fi

From: Paul Eggert
Subject: [Emacs-diffs] master 9597ee6: Out-of-datedness .elc check is merely a file test
Date: Wed, 18 Sep 2019 08:19:03 -0400 (EDT)

branch: master
commit 9597ee68d999d43145d47ff53e1474f1493f8727
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Out-of-datedness .elc check is merely a file test
    * src/fileio.c (file_test_errno): Now extern.
    * src/lread.c (Fload): Use file_test_errno instead,
    since this is really just a file test (the attributes
    are not given to the user).
 etc/NEWS     | 2 +-
 src/fileio.c | 2 +-
 src/lisp.h   | 1 +
 src/lread.c  | 2 +-
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/etc/NEWS b/etc/NEWS
index dce4903..f832210 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2009,7 +2009,7 @@ longer defaults to 'buffer-file-name'.
 ** File metadata primitives now signal an error if I/O, access, or
 other serious errors prevent them from determining the result.
 Formerly, these functions often (though not always) returned nil.
-For example, if the directory /etc/firewalld is not searchable,
+For example, if searching /etc/firewalld results in an I/O error,
 (file-symlink-p "/etc/firewalld/firewalld.conf") now signals an error
 instead of returning nil, because file-symlink-p cannot determine
 whether a symbolic link exists there.  These functions still behave as
diff --git a/src/fileio.c b/src/fileio.c
index 53eecc3..5337ea5 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -265,7 +265,7 @@ file_attribute_errno (Lisp_Object file, int err)
 enum { PICKY_EACCES = false };
-static Lisp_Object
 file_test_errno (Lisp_Object file, int err)
   if (!PICKY_EACCES && err == EACCES)
diff --git a/src/lisp.h b/src/lisp.h
index e68d273..b081ae1 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4315,6 +4315,7 @@ extern AVOID report_file_errno (const char *, 
Lisp_Object, int);
 extern AVOID report_file_error (const char *, Lisp_Object);
 extern AVOID report_file_notify_error (const char *, Lisp_Object);
 extern Lisp_Object file_attribute_errno (Lisp_Object, int);
+extern Lisp_Object file_test_errno (Lisp_Object, int);
 extern bool internal_delete_file (Lisp_Object);
 extern Lisp_Object check_emacs_readlinkat (int, Lisp_Object, char const *);
 extern bool file_directory_p (Lisp_Object);
diff --git a/src/lread.c b/src/lread.c
index d8883db..ab0fab4 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1358,7 +1358,7 @@ Return t if the file exists and loads successfully.  */)
                                        make_fixnum (-1));
              if (result != 0)
-               file_attribute_errno (found, err);
+               file_test_errno (found, err);
              else if (timespec_cmp (get_stat_mtime (&s1),
                                     get_stat_mtime (&s2))
                       < 0)

reply via email to

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