]> code.delx.au - gnu-emacs/blobdiff - src/lread.c
;* src/w32fns.c (syms_of_w32fns): Fix last commit.
[gnu-emacs] / src / lread.c
index ae175296ddbdbd61018428c0b4e81901c8556c3f..11c8d0031c964d8825c225e3dc732cbf5f42461b 100644 (file)
@@ -3024,7 +3024,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
 
                ch = read_escape (readcharfun, 1);
 
-               /* CH is -1 if \ newline has just been seen.  */
+               /* CH is -1 if \ newline or \ space has just been seen.  */
                if (ch == -1)
                  {
                    if (p == read_buffer)
@@ -3280,7 +3280,7 @@ substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Obj
     {
     case Lisp_Vectorlike:
       {
-       ptrdiff_t i, length = 0;
+       ptrdiff_t i = 0, length = 0;
        if (BOOL_VECTOR_P (subtree))
          return subtree;               /* No sub-objects anyway.  */
        else if (CHAR_TABLE_P (subtree) || SUB_CHAR_TABLE_P (subtree)
@@ -3295,7 +3295,9 @@ substitute_object_recurse (Lisp_Object object, Lisp_Object placeholder, Lisp_Obj
             behavior.  */
          wrong_type_argument (Qsequencep, subtree);
 
-       for (i = 0; i < length; i++)
+       if (SUB_CHAR_TABLE_P (subtree))
+         i = 2;
+       for ( ; i < length; i++)
          SUBSTITUTE (AREF (subtree, i),
                      ASET (subtree, i, true_value));
        return subtree;
@@ -3776,8 +3778,11 @@ intern_1 (const char *str, ptrdiff_t len)
   Lisp_Object obarray = check_obarray (Vobarray);
   Lisp_Object tem = oblookup (obarray, str, len, len);
 
-  return SYMBOLP (tem) ? tem : intern_driver (make_string (str, len),
-                                             obarray, tem);
+  return (SYMBOLP (tem) ? tem
+         /* The above `oblookup' was done on the basis of nchars==nbytes, so
+            the string has to be unibyte.  */
+         : intern_driver (make_unibyte_string (str, len),
+                          obarray, tem));
 }
 
 Lisp_Object
@@ -4413,9 +4418,10 @@ init_lread (void)
 void
 dir_warning (char const *use, Lisp_Object dirname)
 {
-  static char const format[] = "Warning: %s `%s': %s\n";
+  static char const format[] = "Warning: %s '%s': %s\n";
   int access_errno = errno;
-  fprintf (stderr, format, use, SSDATA (dirname), strerror (access_errno));
+  fprintf (stderr, format, use, SSDATA (ENCODE_SYSTEM (dirname)),
+          strerror (access_errno));
 
   /* Don't log the warning before we've initialized!!  */
   if (initialized)
@@ -4587,8 +4593,10 @@ of the file, regardless of whether or not it has the `.elc' extension.  */);
 
   DEFVAR_LISP ("load-read-function", Vload_read_function,
               doc: /* Function used by `load' and `eval-region' for reading expressions.
-The default is nil, which means use the function `read'.  */);
-  Vload_read_function = Qnil;
+Called with a single argument (the stream from which to read).
+The default is to use the function `read'.  */);
+  DEFSYM (Qread, "read");
+  Vload_read_function = Qread;
 
   DEFVAR_LISP ("load-source-file-function", Vload_source_file_function,
               doc: /* Function called in `load' to load an Emacs Lisp source file.