/[emacs]/emacs/src/lread.c
ViewVC logotype

Diff of /emacs/src/lread.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.288.2.1 by miles, Wed Jun 12 01:51:21 2002 UTC revision 1.288.2.2 by miles, Fri Apr 4 06:20:59 2003 UTC
# Line 1  Line 1 
1  /* Lisp parsing and input streams.  /* Lisp parsing and input streams.
2     Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99, 2000, 2001, 2002     Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99, 2000, 2001, 2002, 2003
3        Free Software Foundation, Inc.        Free Software Foundation, Inc.
4    
5  This file is part of GNU Emacs.  This file is part of GNU Emacs.
# Line 206  int load_dangerous_libraries; Line 206  int load_dangerous_libraries;
206  static Lisp_Object Vbytecomp_version_regexp;  static Lisp_Object Vbytecomp_version_regexp;
207    
208  static void to_multibyte P_ ((char **, char **, int *));  static void to_multibyte P_ ((char **, char **, int *));
209  static void readevalloop P_ ((Lisp_Object, FILE*, Lisp_Object,  static void readevalloop P_ ((Lisp_Object, FILE*, Lisp_Object,
210                                Lisp_Object (*) (), int,                                Lisp_Object (*) (), int,
211                                Lisp_Object, Lisp_Object));                                Lisp_Object, Lisp_Object));
212  static Lisp_Object load_unwind P_ ((Lisp_Object));  static Lisp_Object load_unwind P_ ((Lisp_Object));
# Line 220  static Lisp_Object load_descriptor_unwin Line 220  static Lisp_Object load_descriptor_unwin
220     The READCHAR and UNREAD macros are meant for reading/unreading a     The READCHAR and UNREAD macros are meant for reading/unreading a
221     byte code; they do not handle multibyte characters.  The caller     byte code; they do not handle multibyte characters.  The caller
222     should manage them if necessary.     should manage them if necessary.
223      
224     [ Actually that seems to be a lie; READCHAR will definitely read     [ Actually that seems to be a lie; READCHAR will definitely read
225       multibyte characters from buffer sources, at least.  Is the       multibyte characters from buffer sources, at least.  Is the
226       comment just out of date?       comment just out of date?
# Line 238  readchar (readcharfun) Line 238  readchar (readcharfun)
238    register int c;    register int c;
239    
240    readchar_count++;    readchar_count++;
241      
242    if (BUFFERP (readcharfun))    if (BUFFERP (readcharfun))
243      {      {
244        register struct buffer *inbuffer = XBUFFER (readcharfun);        register struct buffer *inbuffer = XBUFFER (readcharfun);
# Line 416  unreadchar (readcharfun, c) Line 416  unreadchar (readcharfun, c)
416  static Lisp_Object read_internal_start P_ ((Lisp_Object, Lisp_Object,  static Lisp_Object read_internal_start P_ ((Lisp_Object, Lisp_Object,
417                                              Lisp_Object));                                              Lisp_Object));
418  static Lisp_Object read0 P_ ((Lisp_Object));  static Lisp_Object read0 P_ ((Lisp_Object));
419  static Lisp_Object read1 P_ ((Lisp_Object, int *, int));  static Lisp_Object read1 P_ ((Lisp_Object, int *, int));
420    
421  static Lisp_Object read_list P_ ((int, Lisp_Object));  static Lisp_Object read_list P_ ((int, Lisp_Object));
422  static Lisp_Object read_vector P_ ((Lisp_Object, int));  static Lisp_Object read_vector P_ ((Lisp_Object, int));
# Line 462  read_filtered_event (no_switch_frame, as Line 462  read_filtered_event (no_switch_frame, as
462    if (display_hourglass_p)    if (display_hourglass_p)
463      cancel_hourglass ();      cancel_hourglass ();
464  #endif  #endif
465      
466    delayed_switch_frame = Qnil;    delayed_switch_frame = Qnil;
467    
468    /* Read until we get an acceptable event.  */    /* Read until we get an acceptable event.  */
# Line 503  read_filtered_event (no_switch_frame, as Line 503  read_filtered_event (no_switch_frame, as
503                  XSETFASTINT (val, XINT (tem1) | XINT (Fcar (Fcdr (tem))));                  XSETFASTINT (val, XINT (tem1) | XINT (Fcar (Fcdr (tem))));
504              }              }
505          }          }
506              
507        /* If we don't have a character now, deal with it appropriately.  */        /* If we don't have a character now, deal with it appropriately.  */
508        if (!INTEGERP (val))        if (!INTEGERP (val))
509          {          {
# Line 754  record_load_unwind (old) Line 754  record_load_unwind (old)
754    return Vloads_in_progress = old;    return Vloads_in_progress = old;
755  }  }
756    
757    /* This handler function is used via internal_condition_case_1.  */
758    
759    static Lisp_Object
760    load_error_handler (data)
761         Lisp_Object data;
762    {
763      return Qnil;
764    }
765    
766    
767  DEFUN ("load", Fload, Sload, 1, 5, 0,  DEFUN ("load", Fload, Sload, 1, 5, 0,
768         doc: /* Execute a file of Lisp code named FILE.         doc: /* Execute a file of Lisp code named FILE.
769  First try FILE with `.elc' appended, then try with `.el',  First try FILE with `.elc' appended, then try with `.el',
770   then try FILE unmodified.  Environment variable references in FILE   then try FILE unmodified (the exact suffixes are determined by
771    `load-suffixes').  Environment variable references in FILE
772   are replaced with their values by calling `substitute-in-file-name'.   are replaced with their values by calling `substitute-in-file-name'.
773  This function searches the directories in `load-path'.  This function searches the directories in `load-path'.
774  If optional second arg NOERROR is non-nil,  If optional second arg NOERROR is non-nil,
# Line 778  Return t if file exists.  */) Line 787  Return t if file exists.  */)
787    register FILE *stream;    register FILE *stream;
788    register int fd = -1;    register int fd = -1;
789    register Lisp_Object lispstream;    register Lisp_Object lispstream;
790    int count = specpdl_ptr - specpdl;    int count = SPECPDL_INDEX ();
791    Lisp_Object temp;    Lisp_Object temp;
792    struct gcpro gcpro1;    struct gcpro gcpro1;
793    Lisp_Object found, efound;    Lisp_Object found, efound;
# Line 809  Return t if file exists.  */) Line 818  Return t if file exists.  */)
818       everywhere, it accidentally stayed here.  Since then, enough people       everywhere, it accidentally stayed here.  Since then, enough people
819       supposedly have things like (load "$PROJECT/foo.el") in their .emacs       supposedly have things like (load "$PROJECT/foo.el") in their .emacs
820       that it seemed risky to remove.  */       that it seemed risky to remove.  */
821    file = Fsubstitute_in_file_name (file);    if (! NILP (noerror))
822        {
823          file = internal_condition_case_1 (Fsubstitute_in_file_name, file,
824                                            Qt, load_error_handler);
825          if (NILP (file))
826            return Qnil;
827        }
828      else
829        file = Fsubstitute_in_file_name (file);
830    
831    
832    /* Avoid weird lossage with null string as arg,    /* Avoid weird lossage with null string as arg,
833       since it would try to load a directory as a Lisp file */       since it would try to load a directory as a Lisp file */
834    if (XSTRING (file)->size > 0)    if (SCHARS (file) > 0)
835      {      {
836        int size = STRING_BYTES (XSTRING (file));        int size = SBYTES (file);
837        Lisp_Object tmp[2];        Lisp_Object tmp[2];
838    
839        GCPRO1 (file);        GCPRO1 (file);
# Line 824  Return t if file exists.  */) Line 842  Return t if file exists.  */)
842          {          {
843            /* Don't insist on adding a suffix if FILE already ends with one.  */            /* Don't insist on adding a suffix if FILE already ends with one.  */
844            if (size > 3            if (size > 3
845                && !strcmp (XSTRING (file)->data + size - 3, ".el"))                && !strcmp (SDATA (file) + size - 3, ".el"))
846              must_suffix = Qnil;              must_suffix = Qnil;
847            else if (size > 4            else if (size > 4
848                     && !strcmp (XSTRING (file)->data + size - 4, ".elc"))                     && !strcmp (SDATA (file) + size - 4, ".elc"))
849              must_suffix = Qnil;              must_suffix = Qnil;
850            /* Don't insist on adding a suffix            /* Don't insist on adding a suffix
851               if the argument includes a directory name.  */               if the argument includes a directory name.  */
# Line 848  Return t if file exists.  */) Line 866  Return t if file exists.  */)
866    if (fd == -1)    if (fd == -1)
867      {      {
868        if (NILP (noerror))        if (NILP (noerror))
869          while (1)          Fsignal (Qfile_error, Fcons (build_string ("Cannot open load file"),
870            Fsignal (Qfile_error, Fcons (build_string ("Cannot open load file"),                                       Fcons (file, Qnil)));
                                        Fcons (file, Qnil)));  
871        else        else
872          return Qnil;          return Qnil;
873      }      }
# Line 902  Return t if file exists.  */) Line 919  Return t if file exists.  */)
919       Vload_source_file_function.  */       Vload_source_file_function.  */
920    specbind (Qlexical_binding, Qnil);    specbind (Qlexical_binding, Qnil);
921    
922    if (!bcmp (&(XSTRING (found)->data[STRING_BYTES (XSTRING (found)) - 4]),    if (!bcmp (SDATA (found) + SBYTES (found) - 4,
923               ".elc", 4))               ".elc", 4))
924      /* Load .elc files directly, but not when they are      /* Load .elc files directly, but not when they are
925         remote and have no handler!  */         remote and have no handler!  */
# Line 916  Return t if file exists.  */) Line 933  Return t if file exists.  */)
933              {              {
934                safe_p = 0;                safe_p = 0;
935                if (!load_dangerous_libraries)                if (!load_dangerous_libraries)
936                  error ("File `%s' was not compiled in Emacs",                  {
937                         XSTRING (found)->data);                    if (fd >= 0)
938                        emacs_close (fd);
939                      error ("File `%s' was not compiled in Emacs",
940                             SDATA (found));
941                    }
942                else if (!NILP (nomessage))                else if (!NILP (nomessage))
943                  message_with_string ("File `%s' not compiled in Emacs", found, 1);                  message_with_string ("File `%s' not compiled in Emacs", found, 1);
944              }              }
# Line 930  Return t if file exists.  */) Line 951  Return t if file exists.  */)
951  #ifdef DOS_NT  #ifdef DOS_NT
952            fmode = "rb";            fmode = "rb";
953  #endif /* DOS_NT */  #endif /* DOS_NT */
954            stat ((char *)XSTRING (efound)->data, &s1);            stat ((char *)SDATA (efound), &s1);
955            XSTRING (efound)->data[STRING_BYTES (XSTRING (efound)) - 1] = 0;            SSET (efound, SBYTES (efound) - 1, 0);
956            result = stat ((char *)XSTRING (efound)->data, &s2);            result = stat ((char *)SDATA (efound), &s2);
957            XSTRING (efound)->data[STRING_BYTES (XSTRING (efound)) - 1] = 'c';            SSET (efound, SBYTES (efound) - 1, 'c');
958            UNGCPRO;            UNGCPRO;
959    
960            if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime)            if (result >= 0 && (unsigned) s1.st_mtime < (unsigned) s2.st_mtime)
# Line 947  Return t if file exists.  */) Line 968  Return t if file exists.  */)
968                    Lisp_Object file;                    Lisp_Object file;
969                    file = Fsubstring (found, make_number (0), make_number (-1));                    file = Fsubstring (found, make_number (0), make_number (-1));
970                    message_with_string ("Source file `%s' newer than byte-compiled file",                    message_with_string ("Source file `%s' newer than byte-compiled file",
971                                         file, SMBP (file));                                         file, 1);
972                  }                  }
973              }              }
974          }          }
# Line 972  Return t if file exists.  */) Line 993  Return t if file exists.  */)
993    emacs_close (fd);    emacs_close (fd);
994    GCPRO1 (efound);    GCPRO1 (efound);
995    efound = ENCODE_FILE (found);    efound = ENCODE_FILE (found);
996    stream = fopen ((char *) XSTRING (efound)->data, fmode);    stream = fopen ((char *) SDATA (efound), fmode);
997    UNGCPRO;    UNGCPRO;
998  #else  /* not WINDOWSNT */  #else  /* not WINDOWSNT */
999    stream = fdopen (fd, fmode);    stream = fdopen (fd, fmode);
# Line 980  Return t if file exists.  */) Line 1001  Return t if file exists.  */)
1001    if (stream == 0)    if (stream == 0)
1002      {      {
1003        emacs_close (fd);        emacs_close (fd);
1004        error ("Failure to create stdio stream for %s", XSTRING (file)->data);        error ("Failure to create stdio stream for %s", SDATA (file));
1005      }      }
1006    
1007    if (! NILP (Vpurify_flag))    if (! NILP (Vpurify_flag))
# Line 1088  static int Line 1109  static int
1109  complete_filename_p (pathname)  complete_filename_p (pathname)
1110       Lisp_Object pathname;       Lisp_Object pathname;
1111  {  {
1112    register unsigned char *s = XSTRING (pathname)->data;    register const unsigned char *s = SDATA (pathname);
1113    return (IS_DIRECTORY_SEP (s[0])    return (IS_DIRECTORY_SEP (s[0])
1114            || (XSTRING (pathname)->size > 2            || (SCHARS (pathname) > 2
1115                && IS_DEVICE_SEP (s[1]) && IS_DIRECTORY_SEP (s[2]))                && IS_DEVICE_SEP (s[1]) && IS_DIRECTORY_SEP (s[2]))
1116  #ifdef ALTOS  #ifdef ALTOS
1117            || *s == '@'            || *s == '@'
# Line 1162  openp (path, str, suffixes, storeptr, pr Line 1183  openp (path, str, suffixes, storeptr, pr
1183      {      {
1184        CHECK_STRING_CAR (tail);        CHECK_STRING_CAR (tail);
1185        max_suffix_len = max (max_suffix_len,        max_suffix_len = max (max_suffix_len,
1186                              STRING_BYTES (XSTRING (XCAR (tail))));                              SBYTES (XCAR (tail)));
1187      }      }
1188    
1189    string = filename = Qnil;    string = filename = Qnil;
# Line 1190  openp (path, str, suffixes, storeptr, pr Line 1211  openp (path, str, suffixes, storeptr, pr
1211    
1212        /* Calculate maximum size of any filename made from        /* Calculate maximum size of any filename made from
1213           this path element/specified file name and any possible suffix.  */           this path element/specified file name and any possible suffix.  */
1214        want_size = max_suffix_len + STRING_BYTES (XSTRING (filename)) + 1;        want_size = max_suffix_len + SBYTES (filename) + 1;
1215        if (fn_size < want_size)        if (fn_size < want_size)
1216          fn = (char *) alloca (fn_size = 100 + want_size);          fn = (char *) alloca (fn_size = 100 + want_size);
1217    
# Line 1198  openp (path, str, suffixes, storeptr, pr Line 1219  openp (path, str, suffixes, storeptr, pr
1219        for (tail = NILP (suffixes) ? default_suffixes : suffixes;        for (tail = NILP (suffixes) ? default_suffixes : suffixes;
1220             CONSP (tail); tail = XCDR (tail))             CONSP (tail); tail = XCDR (tail))
1221          {          {
1222            int lsuffix = STRING_BYTES (XSTRING (XCAR (tail)));            int lsuffix = SBYTES (XCAR (tail));
1223            Lisp_Object handler;            Lisp_Object handler;
1224            int exists;            int exists;
1225    
1226            /* Concatenate path element/specified name with the suffix.            /* Concatenate path element/specified name with the suffix.
1227               If the directory starts with /:, remove that.  */               If the directory starts with /:, remove that.  */
1228            if (XSTRING (filename)->size > 2            if (SCHARS (filename) > 2
1229                && XSTRING (filename)->data[0] == '/'                && SREF (filename, 0) == '/'
1230                && XSTRING (filename)->data[1] == ':')                && SREF (filename, 1) == ':')
1231              {              {
1232                strncpy (fn, XSTRING (filename)->data + 2,                strncpy (fn, SDATA (filename) + 2,
1233                         STRING_BYTES (XSTRING (filename)) - 2);                         SBYTES (filename) - 2);
1234                fn[STRING_BYTES (XSTRING (filename)) - 2] = 0;                fn[SBYTES (filename) - 2] = 0;
1235              }              }
1236            else            else
1237              {              {
1238                strncpy (fn, XSTRING (filename)->data,                strncpy (fn, SDATA (filename),
1239                         STRING_BYTES (XSTRING (filename)));                         SBYTES (filename));
1240                fn[STRING_BYTES (XSTRING (filename))] = 0;                fn[SBYTES (filename)] = 0;
1241              }              }
1242    
1243            if (lsuffix != 0)  /* Bug happens on CCI if lsuffix is 0.  */            if (lsuffix != 0)  /* Bug happens on CCI if lsuffix is 0.  */
1244              strncat (fn, XSTRING (XCAR (tail))->data, lsuffix);              strncat (fn, SDATA (XCAR (tail)), lsuffix);
1245    
1246            /* Check that the file exists and is not a directory.  */            /* Check that the file exists and is not a directory.  */
1247            /* We used to only check for handlers on non-absolute file names:            /* We used to only check for handlers on non-absolute file names:
# Line 1252  openp (path, str, suffixes, storeptr, pr Line 1273  openp (path, str, suffixes, storeptr, pr
1273              }              }
1274            else            else
1275              {              {
1276                char *pfn;                const char *pfn;
1277    
1278                encoded_fn = ENCODE_FILE (string);                encoded_fn = ENCODE_FILE (string);
1279                pfn = XSTRING (encoded_fn)->data;                pfn = SDATA (encoded_fn);
1280                exists = (stat (pfn, &st) >= 0                exists = (stat (pfn, &st) >= 0
1281                          && (st.st_mode & S_IFMT) != S_IFDIR);                          && (st.st_mode & S_IFMT) != S_IFDIR);
1282                if (exists)                if (exists)
# Line 1331  build_load_history (stream, source) Line 1352  build_load_history (stream, source)
1352                  {                  {
1353                    newelt = XCAR (tem2);                    newelt = XCAR (tem2);
1354    
1355                    if (NILP (Fmemq (newelt, tem)))                    if (NILP (Fmember (newelt, tem)))
1356                      Fsetcar (tail, Fcons (XCAR (tem),                      Fsetcar (tail, Fcons (XCAR (tem),
1357                                            Fcons (newelt, XCDR (tem))));                                            Fcons (newelt, XCDR (tem))));
1358    
# Line 1401  readevalloop (readcharfun, stream, sourc Line 1422  readevalloop (readcharfun, stream, sourc
1422  {  {
1423    register int c;    register int c;
1424    register Lisp_Object val;    register Lisp_Object val;
1425    int count = specpdl_ptr - specpdl;    int count = SPECPDL_INDEX ();
1426    struct gcpro gcpro1;    struct gcpro gcpro1;
1427    struct buffer *b = 0;    struct buffer *b = 0;
1428    int continue_reading_p;    int continue_reading_p;
# Line 1453  readevalloop (readcharfun, stream, sourc Line 1474  readevalloop (readcharfun, stream, sourc
1474    
1475        if (!NILP (Vpurify_flag) && c == '(')        if (!NILP (Vpurify_flag) && c == '(')
1476          {          {
1477            int count1 = specpdl_ptr - specpdl;            int count1 = SPECPDL_INDEX ();
1478            record_unwind_protect (unreadpure, Qnil);            record_unwind_protect (unreadpure, Qnil);
1479            val = read_list (-1, readcharfun);            val = read_list (-1, readcharfun);
1480            unbind_to (count1, Qnil);            unbind_to (count1, Qnil);
# Line 1512  it specifies the file name to use for `l Line 1533  it specifies the file name to use for `l
1533  The optional fourth argument UNIBYTE specifies `load-convert-to-unibyte'  The optional fourth argument UNIBYTE specifies `load-convert-to-unibyte'
1534  for this invocation.  for this invocation.
1535    
1536  The optional fifth argument DO-ALLOW-PRINT, if not-nil, specifies that  The optional fifth argument DO-ALLOW-PRINT, if non-nil, specifies that
1537  `print' and related functions should work normally even if PRINTFLAG is nil.  `print' and related functions should work normally even if PRINTFLAG is nil.
1538    
1539  This function preserves the position of point.  */)  This function preserves the position of point.  */)
1540       (buffer, printflag, filename, unibyte, do_allow_print)       (buffer, printflag, filename, unibyte, do_allow_print)
1541       Lisp_Object buffer, printflag, filename, unibyte, do_allow_print;       Lisp_Object buffer, printflag, filename, unibyte, do_allow_print;
1542  {  {
1543    int count = specpdl_ptr - specpdl;    int count = SPECPDL_INDEX ();
1544    Lisp_Object tem, buf;    Lisp_Object tem, buf;
1545    
1546    if (NILP (buffer))    if (NILP (buffer))
# Line 1564  This function does not move point.  */) Line 1585  This function does not move point.  */)
1585       (start, end, printflag, read_function)       (start, end, printflag, read_function)
1586       Lisp_Object start, end, printflag, read_function;       Lisp_Object start, end, printflag, read_function;
1587  {  {
1588    int count = specpdl_ptr - specpdl;    int count = SPECPDL_INDEX ();
1589    Lisp_Object tem, cbuf;    Lisp_Object tem, cbuf;
1590    
1591    cbuf = Fcurrent_buffer ();    cbuf = Fcurrent_buffer ();
# Line 1603  STREAM or the value of `standard-input' Line 1624  STREAM or the value of `standard-input'
1624       (stream)       (stream)
1625       Lisp_Object stream;       Lisp_Object stream;
1626  {  {
   extern Lisp_Object Fread_minibuffer ();  
1627    if (NILP (stream))    if (NILP (stream))
1628      stream = Vstandard_input;      stream = Vstandard_input;
1629    if (EQ (stream, Qt))    if (EQ (stream, Qt))
# Line 1651  read_internal_start (stream, start, end) Line 1671  read_internal_start (stream, start, end)
1671      {      {
1672        int startval, endval;        int startval, endval;
1673        if (NILP (end))        if (NILP (end))
1674          endval = XSTRING (stream)->size;          endval = SCHARS (stream);
1675        else        else
1676          {          {
1677            CHECK_NUMBER (end);            CHECK_NUMBER (end);
1678            endval = XINT (end);            endval = XINT (end);
1679            if (endval < 0 || endval > XSTRING (stream)->size)            if (endval < 0 || endval > SCHARS (stream))
1680              args_out_of_range (stream, end);              args_out_of_range (stream, end);
1681          }          }
1682    
# Line 1673  read_internal_start (stream, start, end) Line 1693  read_internal_start (stream, start, end)
1693        read_from_string_index_byte = string_char_to_byte (stream, startval);        read_from_string_index_byte = string_char_to_byte (stream, startval);
1694        read_from_string_limit = endval;        read_from_string_limit = endval;
1695      }      }
1696          
1697    retval = read0 (stream);    retval = read0 (stream);
1698    if (EQ (Vread_with_symbol_positions, Qt)    if (EQ (Vread_with_symbol_positions, Qt)
1699        || EQ (Vread_with_symbol_positions, stream))        || EQ (Vread_with_symbol_positions, stream))
# Line 1820  read_escape (readcharfun, stringp, byter Line 1840  read_escape (readcharfun, stringp, byter
1840        return c | alt_modifier;        return c | alt_modifier;
1841    
1842      case 's':      case 's':
1843          if (stringp)
1844            return ' ';
1845        c = READCHAR;        c = READCHAR;
1846        if (c != '-')        if (c != '-') {
1847          error ("Invalid escape character syntax");          UNREAD (c);
1848            return ' ';
1849          }
1850        c = READCHAR;        c = READCHAR;
1851        if (c == '\\')        if (c == '\\')
1852          c = read_escape (readcharfun, 0, byterep);          c = read_escape (readcharfun, 0, byterep);
# Line 1874  read_escape (readcharfun, stringp, byter Line 1898  read_escape (readcharfun, stringp, byter
1898                  break;                  break;
1899                }                }
1900            }            }
1901            
1902          *byterep = 1;          *byterep = 1;
1903          return i;          return i;
1904        }        }
# Line 1948  read_integer (readcharfun, radix) Line 1972  read_integer (readcharfun, radix)
1972          }          }
1973        else if (c == '+')        else if (c == '+')
1974          c = READCHAR;          c = READCHAR;
1975      
1976        while (c >= 0)        while (c >= 0)
1977          {          {
1978            int digit;            int digit;
1979          
1980            if (c >= '0' && c <= '9')            if (c >= '0' && c <= '9')
1981              digit = c - '0';              digit = c - '0';
1982            else if (c >= 'a' && c <= 'z')            else if (c >= 'a' && c <= 'z')
# Line 2017  to_multibyte (p, end, nchars) Line 2041  to_multibyte (p, end, nchars)
2041    if (nbytes != *nchars)    if (nbytes != *nchars)
2042      nbytes = str_as_multibyte (read_buffer, read_buffer_size,      nbytes = str_as_multibyte (read_buffer, read_buffer_size,
2043                                 *p - read_buffer, nchars);                                 *p - read_buffer, nchars);
2044      
2045    *p = read_buffer + nbytes;    *p = read_buffer + nbytes;
2046  }  }
2047    
# Line 2107  read1 (readcharfun, pch, first_in_list) Line 2131  read1 (readcharfun, pch, first_in_list)
2131    
2132                UNREAD (c);                UNREAD (c);
2133                tmp = read1 (readcharfun, pch, first_in_list);                tmp = read1 (readcharfun, pch, first_in_list);
2134                if (size_in_chars != XSTRING (tmp)->size                if (size_in_chars != SCHARS (tmp)
2135                    /* We used to print 1 char too many                    /* We used to print 1 char too many
2136                       when the number of bits was a multiple of 8.                       when the number of bits was a multiple of 8.
2137                       Accept such input in case it came from an old version.  */                       Accept such input in case it came from an old version.  */
2138                    && ! (XFASTINT (length)                    && ! (XFASTINT (length)
2139                          == (XSTRING (tmp)->size - 1) * BITS_PER_CHAR))                          == (SCHARS (tmp) - 1) * BITS_PER_CHAR))
2140                  Fsignal (Qinvalid_read_syntax,                  Fsignal (Qinvalid_read_syntax,
2141                           Fcons (make_string ("#&...", 5), Qnil));                           Fcons (make_string ("#&...", 5), Qnil));
2142                    
2143                val = Fmake_bool_vector (length, Qnil);                val = Fmake_bool_vector (length, Qnil);
2144                bcopy (XSTRING (tmp)->data, XBOOL_VECTOR (val)->data,                bcopy (SDATA (tmp), XBOOL_VECTOR (val)->data,
2145                       size_in_chars);                       size_in_chars);
2146                /* Clear the extraneous bits in the last byte.  */                /* Clear the extraneous bits in the last byte.  */
2147                if (XINT (length) != size_in_chars * BITS_PER_CHAR)                if (XINT (length) != size_in_chars * BITS_PER_CHAR)
# Line 2170  read1 (readcharfun, pch, first_in_list) Line 2194  read1 (readcharfun, pch, first_in_list)
2194            UNGCPRO;            UNGCPRO;
2195            return tmp;            return tmp;
2196          }          }
2197          
2198        /* #@NUMBER is used to skip NUMBER following characters.        /* #@NUMBER is used to skip NUMBER following characters.
2199           That's used in .elc files to skip over doc strings           That's used in .elc files to skip over doc strings
2200           and function definitions.  */           and function definitions.  */
# Line 2187  read1 (readcharfun, pch, first_in_list) Line 2211  read1 (readcharfun, pch, first_in_list)
2211              }              }
2212            if (c >= 0)            if (c >= 0)
2213              UNREAD (c);              UNREAD (c);
2214              
2215            if (load_force_doc_strings && EQ (readcharfun, Qget_file_char))            if (load_force_doc_strings && EQ (readcharfun, Qget_file_char))
2216              {              {
2217                /* If we are supposed to force doc strings into core right now,                /* If we are supposed to force doc strings into core right now,
# Line 2242  read1 (readcharfun, pch, first_in_list) Line 2266  read1 (readcharfun, pch, first_in_list)
2266    
2267            goto retry;            goto retry;
2268          }          }
2269          if (c == '!')
2270            {
2271              /* #! appears at the beginning of an executable file.
2272                 Skip the first line.  */
2273              while (c != '\n' && c >= 0)
2274                c = READCHAR;
2275              goto retry;
2276            }
2277        if (c == '$')        if (c == '$')
2278          return Vload_file_name;          return Vload_file_name;
2279        if (c == '\'')        if (c == '\'')
# Line 2285  read1 (readcharfun, pch, first_in_list) Line 2317  read1 (readcharfun, pch, first_in_list)
2317    
2318                /* ...and #n# will use the real value from now on.  */                /* ...and #n# will use the real value from now on.  */
2319                Fsetcdr (cell, tem);                Fsetcdr (cell, tem);
2320                  
2321                return tem;                return tem;
2322              }              }
2323            /* #n# returns a previously read object.  */            /* #n# returns a previously read object.  */
# Line 2298  read1 (readcharfun, pch, first_in_list) Line 2330  read1 (readcharfun, pch, first_in_list)
2330              }              }
2331            else if (c == 'r' ||  c == 'R')            else if (c == 'r' ||  c == 'R')
2332              return read_integer (readcharfun, n);              return read_integer (readcharfun, n);
2333              
2334            /* Fall through to error message.  */            /* Fall through to error message.  */
2335          }          }
2336        else if (c == 'x' || c == 'X')        else if (c == 'x' || c == 'X')
# Line 2362  read1 (readcharfun, pch, first_in_list) Line 2394  read1 (readcharfun, pch, first_in_list)
2394      case '?':      case '?':
2395        {        {
2396          int discard;          int discard;
2397            int next_char;
2398            int ok;
2399    
2400          c = READCHAR;          c = READCHAR;
2401          if (c < 0)          if (c < 0)
2402            end_of_file_error ();            end_of_file_error ();
2403    
2404            /* Accept `single space' syntax like (list ? x) where the
2405               whitespace character is SPC or TAB.
2406               Other literal whitespace like NL, CR, and FF are not accepted,
2407               as there are well-established escape sequences for these.  */
2408            if (c == ' ' || c == '\t')
2409              return make_number (c);
2410    
2411          if (c == '\\')          if (c == '\\')
2412            c = read_escape (readcharfun, 0, &discard);            c = read_escape (readcharfun, 0, &discard);
2413          else if (BASE_LEADING_CODE_P (c))          else if (BASE_LEADING_CODE_P (c))
2414            c = read_multibyte (c, readcharfun);            c = read_multibyte (c, readcharfun);
2415    
2416            next_char = READCHAR;
2417            if (next_char == '.')
2418              {
2419                /* Only a dotted-pair dot is valid after a char constant.  */
2420                int next_next_char = READCHAR;
2421                UNREAD (next_next_char);
2422    
2423                ok = (next_next_char <= 040
2424                      || index ("\"';([#?", next_next_char)
2425                      || (!first_in_list && next_next_char == '`')
2426                      || (new_backquote_flag && next_next_char == ','));
2427              }
2428            else
2429              {
2430                ok = (next_char <= 040
2431                      || index ("\"';()[]#?", next_char)
2432                      || (!first_in_list && next_char == '`')
2433                      || (new_backquote_flag && next_char == ','));
2434              }
2435            UNREAD (next_char);
2436            if (!ok)
2437              Fsignal (Qinvalid_read_syntax, Fcons (make_string ("?", 1), Qnil));
2438    
2439          return make_number (c);          return make_number (c);
2440        }        }
2441    
# Line 2524  read1 (readcharfun, pch, first_in_list) Line 2588  read1 (readcharfun, pch, first_in_list)
2588          UNREAD (next_char);          UNREAD (next_char);
2589    
2590          if (next_char <= 040          if (next_char <= 040
2591              || index ("\"'`,(", next_char))              || index ("\"';([#?", next_char)
2592                || (!first_in_list && next_char == '`')
2593                || (new_backquote_flag && next_char == ','))
2594            {            {
2595              *pch = c;              *pch = c;
2596              return Qnil;              return Qnil;
# Line 2545  read1 (readcharfun, pch, first_in_list) Line 2611  read1 (readcharfun, pch, first_in_list)
2611            char *end = read_buffer + read_buffer_size;            char *end = read_buffer + read_buffer_size;
2612    
2613            while (c > 040            while (c > 040
2614                   && !(c == '\"' || c == '\'' || c == ';'                   && !index ("\"';()[]#", c)
2615                        || c == '(' || c == ')'                   && !(!first_in_list && c == '`')
2616                        || c == '[' || c == ']' || c == '#'))                   && !(new_backquote_flag && c == ','))
2617              {              {
2618                if (end - p < MAX_MULTIBYTE_LENGTH)                if (end - p < MAX_MULTIBYTE_LENGTH)
2619                  {                  {
# Line 2557  read1 (readcharfun, pch, first_in_list) Line 2623  read1 (readcharfun, pch, first_in_list)
2623                    p = read_buffer + offset;                    p = read_buffer + offset;
2624                    end = read_buffer + read_buffer_size;                    end = read_buffer + read_buffer_size;
2625                  }                  }
2626                  
2627                if (c == '\\')                if (c == '\\')
2628                  {                  {
2629                    c = READCHAR;                    c = READCHAR;
# Line 2651  read1 (readcharfun, pch, first_in_list) Line 2717  read1 (readcharfun, pch, first_in_list)
2717              : intern (read_buffer);              : intern (read_buffer);
2718            if (EQ (Vread_with_symbol_positions, Qt)            if (EQ (Vread_with_symbol_positions, Qt)
2719                || EQ (Vread_with_symbol_positions, readcharfun))                || EQ (Vread_with_symbol_positions, readcharfun))
2720              Vread_symbol_positions_list =              Vread_symbol_positions_list =
2721                /* Kind of a hack; this will probably fail if characters                /* Kind of a hack; this will probably fail if characters
2722                   in the symbol name were escaped.  Not really a big                   in the symbol name were escaped.  Not really a big
2723                   deal, though.  */                   deal, though.  */
# Line 2682  substitute_object_in_subtree (object, pl Line 2748  substitute_object_in_subtree (object, pl
2748    /* Make all the substitutions. */    /* Make all the substitutions. */
2749    check_object    check_object
2750      = substitute_object_recurse (object, placeholder, object);      = substitute_object_recurse (object, placeholder, object);
2751      
2752    /* Clear seen_list because we're done with it. */    /* Clear seen_list because we're done with it. */
2753    seen_list = Qnil;    seen_list = Qnil;
2754    
# Line 2726  substitute_object_recurse (object, place Line 2792  substitute_object_recurse (object, place
2792       read_objects.  */       read_objects.  */
2793    if (!EQ (Qnil, Frassq (subtree, read_objects)))    if (!EQ (Qnil, Frassq (subtree, read_objects)))
2794      seen_list = Fcons (subtree, seen_list);      seen_list = Fcons (subtree, seen_list);
2795          
2796    /* Recurse according to subtree's type.    /* Recurse according to subtree's type.
2797       Every branch must return a Lisp_Object.  */       Every branch must return a Lisp_Object.  */
2798    switch (XTYPE (subtree))    switch (XTYPE (subtree))
# Line 2739  substitute_object_recurse (object, place Line 2805  substitute_object_recurse (object, place
2805            {            {
2806              Lisp_Object idx = make_number (i);              Lisp_Object idx = make_number (i);
2807              SUBSTITUTE (Faref (subtree, idx),              SUBSTITUTE (Faref (subtree, idx),
2808                          Faset (subtree, idx, true_value));                          Faset (subtree, idx, true_value));
2809            }            }
2810          return subtree;          return subtree;
2811        }        }
# Line 2758  substitute_object_recurse (object, place Line 2824  substitute_object_recurse (object, place
2824          /* Check for text properties in each interval.          /* Check for text properties in each interval.
2825             substitute_in_interval contains part of the logic. */             substitute_in_interval contains part of the logic. */
2826    
2827          INTERVAL    root_interval = XSTRING (subtree)->intervals;          INTERVAL    root_interval = STRING_INTERVALS (subtree);
2828          Lisp_Object arg           = Fcons (object, placeholder);          Lisp_Object arg           = Fcons (object, placeholder);
2829              
2830          traverse_intervals_noorder (root_interval,          traverse_intervals_noorder (root_interval,
2831                                      &substitute_in_interval, arg);                                      &substitute_in_interval, arg);
2832    
# Line 2797  isfloat_string (cp) Line 2863  isfloat_string (cp)
2863       register char *cp;       register char *cp;
2864  {  {
2865    register int state;    register int state;
2866      
2867    char *start = cp;    char *start = cp;
2868    
2869    state = 0;    state = 0;
# Line 2904  read_vector (readcharfun, bytecodeflag) Line 2970  read_vector (readcharfun, bytecodeflag)
2970                    /* Coerce string to unibyte (like string-as-unibyte,                    /* Coerce string to unibyte (like string-as-unibyte,
2971                       but without generating extra garbage and                       but without generating extra garbage and
2972                       guaranteeing no change in the contents).  */                       guaranteeing no change in the contents).  */
2973                    XSTRING (bytestr)->size = STRING_BYTES (XSTRING (bytestr));                    STRING_SET_CHARS (bytestr, SBYTES (bytestr));
2974                    SET_STRING_BYTES (XSTRING (bytestr), -1);                    STRING_SET_UNIBYTE (bytestr);
2975    
2976                    item = Fread (bytestr);                    item = Fread (bytestr);
2977                    if (!CONSP (item))                    if (!CONSP (item))
# Line 2928  read_vector (readcharfun, bytecodeflag) Line 2994  read_vector (readcharfun, bytecodeflag)
2994      }      }
2995    return vector;    return vector;
2996  }  }
2997      
2998  /* FLAG = 1 means check for ] to terminate rather than ) and .  /* FLAG = 1 means check for ] to terminate rather than ) and .
2999     FLAG = -1 means check for starting with defun     FLAG = -1 means check for starting with defun
3000      and make structure pure.  */      and make structure pure.  */
# Line 2947  read_list (flag, readcharfun) Line 3013  read_list (flag, readcharfun)
3013    struct gcpro gcpro1, gcpro2;    struct gcpro gcpro1, gcpro2;
3014    /* 0 is the normal case.    /* 0 is the normal case.
3015       1 means this list is a doc reference; replace it with the number 0.       1 means this list is a doc reference; replace it with the number 0.
3016       2 means this list is a doc reference; replace it with the doc string.  */       2 means this list is a doc reference; replace it with the doc string.  */
3017    int doc_reference = 0;    int doc_reference = 0;
3018    
3019    /* Initialize this to 1 if we are reading a list.  */    /* Initialize this to 1 if we are reading a list.  */
# Line 3117  Lisp_Object initial_obarray; Line 3183  Lisp_Object initial_obarray;
3183  int oblookup_last_bucket_number;  int oblookup_last_bucket_number;
3184    
3185  static int hash_string ();  static int hash_string ();
 Lisp_Object oblookup ();  
3186    
3187  /* Get an error if OBARRAY is not an obarray.  /* Get an error if OBARRAY is not an obarray.
3188     If it is one, return it.  */     If it is one, return it.  */
# Line 3141  check_obarray (obarray) Line 3206  check_obarray (obarray)
3206    
3207  Lisp_Object  Lisp_Object
3208  intern (str)  intern (str)
3209       char *str;       const char *str;
3210  {  {
3211    Lisp_Object tem;    Lisp_Object tem;
3212    int len = strlen (str);    int len = strlen (str);
# Line 3184  it defaults to the value of `obarray'. Line 3249  it defaults to the value of `obarray'.
3249    
3250    CHECK_STRING (string);    CHECK_STRING (string);
3251    
3252    tem = oblookup (obarray, XSTRING (string)->data,    tem = oblookup (obarray, SDATA (string),
3253                    XSTRING (string)->size,                    SCHARS (string),
3254                    STRING_BYTES (XSTRING (string)));                    SBYTES (string));
3255    if (!INTEGERP (tem))    if (!INTEGERP (tem))
3256      return tem;      return tem;
3257    
# Line 3199  it defaults to the value of `obarray'. Line 3264  it defaults to the value of `obarray'.
3264    else    else
3265      XSYMBOL (sym)->interned = SYMBOL_INTERNED;      XSYMBOL (sym)->interned = SYMBOL_INTERNED;
3266    
3267    if ((XSTRING (string)->data[0] == ':')    if ((SREF (string, 0) == ':')
3268        && EQ (obarray, initial_obarray))        && EQ (obarray, initial_obarray))
3269      {      {
3270        XSYMBOL (sym)->constant = 1;        XSYMBOL (sym)->constant = 1;
# Line 3224  it defaults to the value of `obarray'. Line 3289  it defaults to the value of `obarray'.
3289       (name, obarray)       (name, obarray)
3290       Lisp_Object name, obarray;       Lisp_Object name, obarray;
3291  {  {
3292    register Lisp_Object tem;    register Lisp_Object tem, string;
   struct Lisp_String *string;  
3293    
3294    if (NILP (obarray)) obarray = Vobarray;    if (NILP (obarray)) obarray = Vobarray;
3295    obarray = check_obarray (obarray);    obarray = check_obarray (obarray);
# Line 3233  it defaults to the value of `obarray'. Line 3297  it defaults to the value of `obarray'.
3297    if (!SYMBOLP (name))    if (!SYMBOLP (name))
3298      {      {
3299        CHECK_STRING (name);        CHECK_STRING (name);
3300        string = XSTRING (name);        string = name;
3301      }      }
3302    else    else
3303      string = XSTRING (SYMBOL_NAME (name));      string = SYMBOL_NAME (name);
3304    
3305    tem = oblookup (obarray, string->data, string->size, STRING_BYTES (string));    tem = oblookup (obarray, SDATA (string), SCHARS (string), SBYTES (string));
3306    if (INTEGERP (tem) || (SYMBOLP (name) && !EQ (name, tem)))    if (INTEGERP (tem) || (SYMBOLP (name) && !EQ (name, tem)))
3307      return Qnil;      return Qnil;
3308    else    else
# Line 3268  OBARRAY defaults to the value of the var Line 3332  OBARRAY defaults to the value of the var
3332        string = name;        string = name;
3333      }      }
3334    
3335    tem = oblookup (obarray, XSTRING (string)->data,    tem = oblookup (obarray, SDATA (string),
3336                    XSTRING (string)->size,                    SCHARS (string),
3337                    STRING_BYTES (XSTRING (string)));                    SBYTES (string));
3338    if (INTEGERP (tem))    if (INTEGERP (tem))
3339      return Qnil;      return Qnil;
3340    /* If arg was a symbol, don't delete anything but that symbol itself.  */    /* If arg was a symbol, don't delete anything but that symbol itself.  */
# Line 3319  OBARRAY defaults to the value of the var Line 3383  OBARRAY defaults to the value of the var
3383  Lisp_Object  Lisp_Object
3384  oblookup (obarray, ptr, size, size_byte)  oblookup (obarray, ptr, size, size_byte)
3385       Lisp_Object obarray;       Lisp_Object obarray;
3386       register char *ptr;       register const char *ptr;
3387       int size, size_byte;       int size, size_byte;
3388  {  {
3389    int hash;    int hash;
# Line 3347  oblookup (obarray, ptr, size, size_byte) Line 3411  oblookup (obarray, ptr, size, size_byte)
3411    else    else
3412      for (tail = bucket; ; XSETSYMBOL (tail, XSYMBOL (tail)->next))      for (tail = bucket; ; XSETSYMBOL (tail, XSYMBOL (tail)->next))
3413        {        {
3414          if (STRING_BYTES (XSTRING (SYMBOL_NAME (tail))) == size_byte          if (SBYTES (SYMBOL_NAME (tail)) == size_byte
3415              && XSTRING (SYMBOL_NAME (tail))->size == size              && SCHARS (SYMBOL_NAME (tail)) == size
3416              && !bcmp (XSTRING (SYMBOL_NAME (tail))->data, ptr, size_byte))              && !bcmp (SDATA (SYMBOL_NAME (tail)), ptr, size_byte))
3417            return tail;            return tail;
3418          else if (XSYMBOL (tail)->next == 0)          else if (XSYMBOL (tail)->next == 0)
3419            break;            break;
# Line 3360  oblookup (obarray, ptr, size, size_byte) Line 3424  oblookup (obarray, ptr, size, size_byte)
3424    
3425  static int  static int
3426  hash_string (ptr, len)  hash_string (ptr, len)
3427       unsigned char *ptr;       const unsigned char *ptr;
3428       int len;       int len;
3429  {  {
3430    register unsigned char *p = ptr;    register const unsigned char *p = ptr;
3431    register unsigned char *end = p + len;    register const unsigned char *end = p + len;
3432    register unsigned char c;    register unsigned char c;
3433    register int hash = 0;    register int hash = 0;
3434    
# Line 3438  init_obarray () Line 3502  init_obarray ()
3502    /* Intern nil in the obarray */    /* Intern nil in the obarray */
3503    XSYMBOL (Qnil)->interned = SYMBOL_INTERNED_IN_INITIAL_OBARRAY;    XSYMBOL (Qnil)->interned = SYMBOL_INTERNED_IN_INITIAL_OBARRAY;
3504    XSYMBOL (Qnil)->constant = 1;    XSYMBOL (Qnil)->constant = 1;
3505      
3506    /* These locals are to kludge around a pyramid compiler bug. */    /* These locals are to kludge around a pyramid compiler bug. */
3507    hash = hash_string ("nil", 3);    hash = hash_string ("nil", 3);
3508    /* Separate statement here to avoid VAXC bug. */    /* Separate statement here to avoid VAXC bug. */
# Line 3575  defvar_per_buffer (namestring, address, Line 3639  defvar_per_buffer (namestring, address,
3639    XSYMBOL (sym)->declared_special = 1;    XSYMBOL (sym)->declared_special = 1;
3640    PER_BUFFER_SYMBOL (offset) = sym;    PER_BUFFER_SYMBOL (offset) = sym;
3641    PER_BUFFER_TYPE (offset) = type;    PER_BUFFER_TYPE (offset) = type;
3642      
3643    if (PER_BUFFER_IDX (offset) == 0)    if (PER_BUFFER_IDX (offset) == 0)
3644      /* Did a DEFVAR_PER_BUFFER without initializing the corresponding      /* Did a DEFVAR_PER_BUFFER without initializing the corresponding
3645         slot of buffer_local_flags */         slot of buffer_local_flags */
# Line 3748  init_lread () Line 3812  init_lread ()
3812  #endif  #endif
3813    
3814  #ifndef WINDOWSNT  #ifndef WINDOWSNT
3815    /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is    /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is
3816       almost never correct, thereby causing a warning to be printed out that       almost never correct, thereby causing a warning to be printed out that
3817       confuses users.  Since PATH_LOADSEARCH is always overridden by the       confuses users.  Since PATH_LOADSEARCH is always overridden by the
3818       EMACSLOADPATH environment variable below, disable the warning on NT.  */       EMACSLOADPATH environment variable below, disable the warning on NT.  */
3819    
# Line 3767  init_lread () Line 3831  init_lread ()
3831            if (STRINGP (dirfile))            if (STRINGP (dirfile))
3832              {              {
3833                dirfile = Fdirectory_file_name (dirfile);                dirfile = Fdirectory_file_name (dirfile);
3834                if (access (XSTRING (dirfile)->data, 0) < 0)                if (access (SDATA (dirfile), 0) < 0)
3835                  dir_warning ("Warning: Lisp directory `%s' does not exist.\n",                  dir_warning ("Warning: Lisp directory `%s' does not exist.\n",
3836                               XCAR (path_tail));                               XCAR (path_tail));
3837              }              }
# Line 3803  dir_warning (format, dirname) Line 3867  dir_warning (format, dirname)
3867       Lisp_Object dirname;       Lisp_Object dirname;
3868  {  {
3869    char *buffer    char *buffer
3870      = (char *) alloca (XSTRING (dirname)->size + strlen (format) + 5);      = (char *) alloca (SCHARS (dirname) + strlen (format) + 5);
3871    
3872    fprintf (stderr, format, XSTRING (dirname)->data);    fprintf (stderr, format, SDATA (dirname));
3873    sprintf (buffer, format, XSTRING (dirname)->data);    sprintf (buffer, format, SDATA (dirname));
3874    /* Don't log the warning before we've initialized!! */    /* Don't log the warning before we've initialized!! */
3875    if (initialized)    if (initialized)
3876      message_dolog (buffer, strlen (buffer), 0, STRING_MULTIBYTE (dirname));      message_dolog (buffer, strlen (buffer), 0, STRING_MULTIBYTE (dirname));
# Line 3860  the toplevel; bind it instead. */); Line 3924  the toplevel; bind it instead. */);
3924    Vread_with_symbol_positions = Qnil;    Vread_with_symbol_positions = Qnil;
3925    
3926    DEFVAR_LISP ("read-symbol-positions-list", &Vread_symbol_positions_list,    DEFVAR_LISP ("read-symbol-positions-list", &Vread_symbol_positions_list,
3927                 doc: /* An list mapping read symbols to their positions.                 doc: /* A list mapping read symbols to their positions.
3928  This variable is modified during calls to `read' or  This variable is modified during calls to `read' or
3929  `read-from-string', but only when `read-with-symbol-positions' is  `read-from-string', but only when `read-with-symbol-positions' is
3930  non-nil.  non-nil.
3931    
3932  Each element of the list looks like (SYMBOL . CHAR-POSITION), where  Each element of the list looks like (SYMBOL . CHAR-POSITION), where
3933  CHAR-POSITION is an integer giving the offset of that occurence of the  CHAR-POSITION is an integer giving the offset of that occurrence of the
3934  symbol from the position where `read' or `read-from-string' started.  symbol from the position where `read' or `read-from-string' started.
3935    
3936  Note that a symbol will appear multiple times in this list, if it was  Note that a symbol will appear multiple times in this list, if it was
3937  read multiple times.  The list is in the same order as the symbols  read multiple times.  The list is in the same order as the symbols
3938  were read in. */);  were read in. */);
3939    Vread_symbol_positions_list = Qnil;      Vread_symbol_positions_list = Qnil;
3940    
3941    DEFVAR_LISP ("load-path", &Vload_path,    DEFVAR_LISP ("load-path", &Vload_path,
3942                 doc: /* *List of directories to search for files to load.                 doc: /* *List of directories to search for files to load.
# Line 3911  when the corresponding call to `provide' Line 3975  when the corresponding call to `provide'
3975  Each alist element is a list that starts with a file name,  Each alist element is a list that starts with a file name,
3976  except for one element (optional) that starts with nil and describes  except for one element (optional) that starts with nil and describes
3977  definitions evaluated from buffers not visiting files.  definitions evaluated from buffers not visiting files.
3978  The remaining elements of each list are symbols defined as functions  The remaining elements of each list are symbols defined as functions,
3979  or variables, and cons cells `(provide . FEATURE)', `(require . FEATURE)',  and cons cells of the form `(provide . FEATURE)', `(require . FEATURE)',
3980  and `(autoload . SYMBOL)'.  */);  `(defvar . VARIABLE), `(autoload . SYMBOL)', and `(t . SYMBOL)'.
3981    An element `(t . SYMBOL)' precedes an entry that is just SYMBOL,
3982    and means that SYMBOL was an autoload before this file redefined it
3983    as a function.  */);
3984    Vload_history = Qnil;    Vload_history = Qnil;
3985    
3986    DEFVAR_LISP ("load-file-name", &Vload_file_name,    DEFVAR_LISP ("load-file-name", &Vload_file_name,
# Line 4043  This variable automatically becomes buff Line 4110  This variable automatically becomes buff
4110    staticpro (&read_objects);    staticpro (&read_objects);
4111    read_objects = Qnil;    read_objects = Qnil;
4112    staticpro (&seen_list);    staticpro (&seen_list);
4113      
4114    Vloads_in_progress = Qnil;    Vloads_in_progress = Qnil;
4115    staticpro (&Vloads_in_progress);    staticpro (&Vloads_in_progress);
4116  }  }

Legend:
Removed from v.1.288.2.1  
changed lines
  Added in v.1.288.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26