diff options
author | Richard M. Stallman <rms@gnu.org> | 1993-01-10 16:44:36 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1993-01-10 16:44:36 +0000 |
commit | b2fa9eaaf972788838dd0303d7fffe7022c24c29 (patch) | |
tree | 30a69e8c2797bc49f16f7991d248c3d2f9fd2489 /src/lread.c | |
parent | a9e040c8c8709bcd1bef3b898b8551ca0e882070 (diff) | |
download | emacs-b2fa9eaaf972788838dd0303d7fffe7022c24c29.tar.gz |
(Fload): If warn that .elc file is older,
inhibit the ordinary message that would follow.
Diffstat (limited to 'src/lread.c')
-rw-r--r-- | src/lread.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lread.c b/src/lread.c index ded35fa780a..0198dda9aca 100644 --- a/src/lread.c +++ b/src/lread.c @@ -302,6 +302,8 @@ Return t if file exists.") Lisp_Object temp; struct gcpro gcpro1; Lisp_Object found; + /* 1 means inhibit the message at the beginning. */ + int nomessage1 = 0; CHECK_STRING (str, 0); str = Fsubstitute_in_file_name (str); @@ -334,8 +336,13 @@ Return t if file exists.") XSTRING (found)->data[XSTRING (found)->size - 1] = 0; result = stat (XSTRING (found)->data, &s2); if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime) - message ("Source file `%s' newer than byte-compiled file", - XSTRING (found)->data); + { + message ("Source file `%s' newer than byte-compiled file", + XSTRING (found)->data); + /* Don't immediately overwrite this message. */ + if (!noninteractive) + nomessage1 = 1; + } XSTRING (found)->data[XSTRING (found)->size - 1] = 'c'; } @@ -346,7 +353,7 @@ Return t if file exists.") error ("Failure to create stdio stream for %s", XSTRING (str)->data); } - if (NILP (nomessage)) + if (NILP (nomessage) && !nomessage1) message ("Loading %s...", XSTRING (str)->data); GCPRO1 (str); |