]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fload): Don't assume that message_with_ntring uses the
authorGerd Moellmann <gerd@gnu.org>
Mon, 11 Mar 2002 18:42:35 +0000 (18:42 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 11 Mar 2002 18:42:35 +0000 (18:42 +0000)
string it is given like a C string.

src/ChangeLog
src/lread.c

index ba5eaa43fe0cf9c78921f66633c08eaa92597a0c..ec86d1539c11f53eef6290173189e2a3098bbfae 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-11  Gerd Moellmann  <gerd@gnu.org>
+
+       * lread.c (Fload): Don't assume that message_with_ntring uses the
+       string it is given like a C string.
+
 2002-03-10  Jan D.  <Jan.Djarv@mbox200.swipnet.se>
 
        * xterm.h: Extern declare x_session_check_input () and
index 9e2687e272bebec20589062e2d5b1571dc1c4098..81ae1f27a556e8c2c920b90c9e5acb21dbbb43d4 100644 (file)
@@ -776,17 +776,22 @@ Return t if file exists.  */)
          stat ((char *)XSTRING (found)->data, &s1);
          XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 0;
          result = stat ((char *)XSTRING (found)->data, &s2);
+         XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 'c';
+         
          if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime)
            {
              /* Make the progress messages mention that source is newer.  */
              newer = 1;
 
              /* If we won't print another message, mention this anyway.  */
-             if (! NILP (nomessage))
-               message_with_string ("Source file `%s' newer than byte-compiled file",
-                                    found, 1);
+             if (!NILP (nomessage))
+               {
+                 Lisp_Object file;
+                 file = Fsubstring (found, make_number (0), make_number (-1));
+                 message_with_string ("Source file `%s' newer than byte-compiled file",
+                                      file, SMBP (file));
+               }
            }
-         XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 1] = 'c';
        }
     }
   else