]> git.eshelyaron.com Git - emacs.git/commitdiff
Out-of-datedness .elc check is merely a file test
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 18 Sep 2019 12:17:03 +0000 (05:17 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 18 Sep 2019 12:18:58 +0000 (05:18 -0700)
* 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
src/fileio.c
src/lisp.h
src/lread.c

index dce4903384f058a225763ff842dccfcab4ce7f0e..f8322104d42eec4b597e3e64d37ef93e17b1b5e9 100644 (file)
--- 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
index 53eecc31aaf552ec35a00751ca75bafc12cd2b9c..5337ea5c800fd10b5c4a6b95a2e62ea75d974b85 100644 (file)
@@ -265,7 +265,7 @@ file_attribute_errno (Lisp_Object file, int err)
 enum { PICKY_EACCES = false };
 #endif
 
-static Lisp_Object
+Lisp_Object
 file_test_errno (Lisp_Object file, int err)
 {
   if (!PICKY_EACCES && err == EACCES)
index e68d2732e21673f6754a6c8254fa4c98499ead66..b081ae1cee8808e284f7fb077c2a2fa0026458c5 100644 (file)
@@ -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);
index d8883db46c1fdae4c22bad742bb1f219841642e4..ab0fab47a98132e998f22cc7d3d965f579518ef1 100644 (file)
@@ -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)