]> code.delx.au - gnu-emacs/blobdiff - src/data.c
(wait_reading_process_input): Don't signal SIGIO in batch mode.
[gnu-emacs] / src / data.c
index 5ccc3194b2987957d079f759b5684efbefff7f0b..d18cb187f6217706c2c2723d3b7185b0e257c0ae 100644 (file)
@@ -1,5 +1,5 @@
 /* Primitive operations on Lisp data types for GNU Emacs Lisp interpreter.
-   Copyright (C) 1985,86,88,93,94,95,97,98,99, 2000, 2001
+   Copyright (C) 1985,86,88,93,94,95,97,98,99, 2000, 2001, 2003
    Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -898,9 +898,6 @@ store_symval_forwarding (symbol, valcontents, newval, buf)
            Lisp_Object type;
 
            type = PER_BUFFER_TYPE (offset);
-           if (XINT (type) == -1)
-             error ("Variable %s is read-only", SDATA (SYMBOL_NAME (symbol)));
-
            if (! NILP (type) && ! NILP (newval)
                && XTYPE (newval) != XINT (type))
              buffer_slot_type_mismatch (offset);
@@ -1095,7 +1092,7 @@ static int
 let_shadows_buffer_binding_p (symbol)
      Lisp_Object symbol;
 {
-  struct specbinding *p;
+  volatile struct specbinding *p;
 
   for (p = specpdl_ptr - 1; p >= specpdl; p--)
     if (p->func == NULL
@@ -1616,10 +1613,11 @@ From now on the default value will apply in this buffer.  Return VARIABLE.  */)
      loaded, recompute its value.  We have to do it now, or else
      forwarded objects won't work right.  */
   {
-    Lisp_Object *pvalbuf;
+    Lisp_Object *pvalbuf, buf;
     valcontents = SYMBOL_VALUE (variable);
     pvalbuf = &XBUFFER_LOCAL_VALUE (valcontents)->buffer;
-    if (current_buffer == XBUFFER (*pvalbuf))
+    XSETBUFFER (buf, current_buffer);
+    if (EQ (buf, *pvalbuf))
       {
        *pvalbuf = Qnil;
        XBUFFER_LOCAL_VALUE (valcontents)->found_for_buffer = 0;
@@ -2031,13 +2029,15 @@ bool-vector.  IDX starts at 0.  */)
     }
   else if (STRING_MULTIBYTE (array))
     {
-      int idxval_byte, prev_bytes, new_bytes;
+      int idxval_byte, prev_bytes, new_bytes, nbytes;
       unsigned char workbuf[MAX_MULTIBYTE_LENGTH], *p0 = workbuf, *p1;
 
       if (idxval < 0 || idxval >= SCHARS (array))
        args_out_of_range (array, idx);
       CHECK_NUMBER (newelt);
 
+      nbytes = SBYTES (array);
+
       idxval_byte = string_char_to_byte (array, idxval);
       p1 = SDATA (array) + idxval_byte;
       PARSE_MULTIBYTE_SEQ (p1, nbytes - idxval_byte, prev_bytes);
@@ -2046,7 +2046,6 @@ bool-vector.  IDX starts at 0.  */)
        {
          /* We must relocate the string data.  */
          int nchars = SCHARS (array);
-         int nbytes = SBYTES (array);
          unsigned char *str;
 
          str = (nbytes <= MAX_ALLOCA
@@ -2245,7 +2244,7 @@ Lisp_Object
 long_to_cons (i)
      unsigned long i;
 {
-  unsigned int top = i >> 16;
+  unsigned long top = i >> 16;
   unsigned int bot = i & 0xFFFF;
   if (top == 0)
     return make_number (bot);
@@ -2318,7 +2317,7 @@ digit_to_number (character, base)
 }
 
 DEFUN ("string-to-number", Fstring_to_number, Sstring_to_number, 1, 2, 0,
-       doc: /* Return a number obtained by parsing STRING as a decimal number.
+       doc: /* Parse STRING as a decimal number and return the number.
 This parses both integers and floating point numbers.
 It ignores leading spaces and tabs.
 
@@ -2561,7 +2560,7 @@ usage: (+ &rest NUMBERS-OR-MARKERS)  */)
 }
 
 DEFUN ("-", Fminus, Sminus, 0, MANY, 0,
-       doc: /* Negate number or subtract numbers or markers, returns the result.
+       doc: /* Negate number or subtract numbers or markers and return the result.
 With one arg, negates it.  With more than one arg,
 subtracts all but the first from the first.
 usage: (- &optional NUMBER-OR-MARKER &rest MORE-NUMBERS-OR-MARKERS)  */)