home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / packages / bytecomp / lread.c.patch < prev    next >
Encoding:
Text File  |  1991-10-29  |  1.9 KB  |  76 lines

  1. *** old-lread.c    Sat Oct 12 14:45:59 1991
  2. --- lread.c    Tue Oct 29 10:45:42 1991
  3. ***************
  4. *** 792,797 ****
  5. --- 792,815 ----
  6.         }
  7.   
  8.       case '#':
  9. +       c = READCHAR;
  10. +       if (c == '[') {
  11. +     /* accept compiled functions at read-time so that we don't have to
  12. +        build them at load-time. */
  13. +     Lisp_Object vec = read_vector (readcharfun);
  14. +     XSETTYPE (vec, Lisp_Compiled);
  15. +     if (XVECTOR (vec)->size < 4 || XVECTOR (vec)->size > 6)
  16. +       return Fsignal (Qinvalid_read_syntax,
  17. +               Fcons (build_string
  18. +                  ("#[...] used with wrong number of elements"),
  19. +                  Qnil));
  20. + # if 0
  21. +     return (NULL (Vpurify_flag) ? vec : Fpurecopy (vec));
  22. + # else
  23. +     return vec;
  24. + # endif
  25. +       }
  26. +       UNREAD (c);
  27.         return Fsignal (Qinvalid_read_syntax, Fcons (make_string ("#", 1), Qnil));
  28.   
  29.       case ';':
  30. ***************
  31. *** 916,928 ****
  32.           {
  33.             int number = 0;
  34.   
  35.             if (read_buffer[0] == '0')
  36.               {
  37.                 p = read_buffer;
  38. !               while (p1 != p)
  39. !             number = number << 3 + *p++ - '0';
  40.               }
  41.             else
  42.               number = atoi (read_buffer);
  43.   
  44.             XSET (val, Lisp_Int, number);
  45. --- 934,963 ----
  46.           {
  47.             int number = 0;
  48.   
  49. +           /* First of all, the code that was here to parse octal
  50. +              digits was *broken*.  The code below is fixed.  But
  51. +              second, and more importantly, making 010 read as an
  52. +              octal digit breaks a *lot* of existing elisp files,
  53. +              and is therefore not worth it.  so this code is
  54. +              commented out.
  55. +            */
  56. + #if 0
  57.             if (read_buffer[0] == '0')
  58.               {
  59.                 p = read_buffer;
  60. !               while (p1 != p) {
  61. !             
  62. !               if (*p < '0' || *p > '7')
  63. !               return Fsignal
  64. !                 (Qinvalid_read_syntax,
  65. !                  Fcons (make_string ("non-octal digit", 15),
  66. !                     Qnil));
  67. !             
  68. !             number = (number << 3) + *p++ - '0';
  69. !               }
  70.               }
  71.             else
  72. + #endif
  73.               number = atoi (read_buffer);
  74.   
  75.             XSET (val, Lisp_Int, number);
  76.