Merged in changes from CVS trunk.
[bpt/emacs.git] / src / lread.c
index 603c871..46fe6cd 100644 (file)
@@ -1,5 +1,5 @@
 /* Lisp parsing and input streams.
-   Copyright (C) 1985, 86, 87, 88, 89, 93, 94, 95, 97, 98, 99, 2000, 01, 2003
+   Copyright (C) 1985,86,87,88,89,93,94,95,97,98,99,2000,01,03,2004
       Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA.  */
 #include <epaths.h>
 #include "commands.h"
 #include "keyboard.h"
+#include "frame.h"
 #include "termhooks.h"
 #include "coding.h"
 
@@ -1993,8 +1994,9 @@ read1 (readcharfun, pch, first_in_list)
          if (c == '"')
            {
              Lisp_Object tmp, val;
-             int size_in_chars = ((XFASTINT (length) + BITS_PER_CHAR - 1)
-                                  / BITS_PER_CHAR);
+             int size_in_chars
+               = ((XFASTINT (length) + BOOL_VECTOR_BITS_PER_CHAR - 1)
+                  / BOOL_VECTOR_BITS_PER_CHAR);
 
              UNREAD (c);
              tmp = read1 (readcharfun, pch, first_in_list);
@@ -2003,7 +2005,7 @@ read1 (readcharfun, pch, first_in_list)
                     when the number of bits was a multiple of 8.
                     Accept such input in case it came from an old version.  */
                  && ! (XFASTINT (length)
-                       == (SCHARS (tmp) - 1) * BITS_PER_CHAR))
+                       == (SCHARS (tmp) - 1) * BOOL_VECTOR_BITS_PER_CHAR))
                Fsignal (Qinvalid_read_syntax,
                         Fcons (make_string ("#&...", 5), Qnil));
 
@@ -2011,9 +2013,9 @@ read1 (readcharfun, pch, first_in_list)
              bcopy (SDATA (tmp), XBOOL_VECTOR (val)->data,
                     size_in_chars);
              /* Clear the extraneous bits in the last byte.  */
-             if (XINT (length) != size_in_chars * BITS_PER_CHAR)
+             if (XINT (length) != size_in_chars * BOOL_VECTOR_BITS_PER_CHAR)
                XBOOL_VECTOR (val)->data[size_in_chars - 1]
-                 &= (1 << (XINT (length) % BITS_PER_CHAR)) - 1;
+                 &= (1 << (XINT (length) % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
              return val;
            }
          Fsignal (Qinvalid_read_syntax, Fcons (make_string ("#&...", 5),
@@ -3495,7 +3497,6 @@ defvar_per_buffer (namestring, address, type, doc)
 {
   Lisp_Object sym, val;
   int offset;
-  extern struct buffer buffer_local_symbols;
 
   sym = intern (namestring);
   val = allocate_misc ();
@@ -3677,11 +3678,15 @@ init_lread ()
     }
 #endif
 
-#ifndef WINDOWSNT
+#if (!(defined(WINDOWSNT) || (defined(HAVE_CARBON))))
   /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is
      almost never correct, thereby causing a warning to be printed out that
      confuses users.  Since PATH_LOADSEARCH is always overridden by the
-     EMACSLOADPATH environment variable below, disable the warning on NT.  */
+     EMACSLOADPATH environment variable below, disable the warning on NT.  
+     Also, when using the "self-contained" option for Carbon Emacs for MacOSX,
+     the "standard" paths may not exist and would be overridden by
+     EMACSLOADPATH as on NT.  Since this depends on how the executable
+     was build and packaged, turn off the warnings in general */
 
   /* Warn if dirs in the *standard* path don't exist.  */
   if (!turn_off_warning)
@@ -3703,7 +3708,7 @@ init_lread ()
            }
        }
     }
-#endif /* WINDOWSNT */
+#endif /* !(WINDOWSNT || HAVE_CARBON) */
 
   /* If the EMACSLOADPATH environment variable is set, use its value.
      This doesn't apply if we're dumping.  */