]> code.delx.au - gnu-emacs/blobdiff - src/data.c
(Finsert_file_contents): Delete incorrect decrement of specpdl_ptr.
[gnu-emacs] / src / data.c
index f86d5c7c61b4d7070d77321366313a712433ec9b..7e5470a2a0819a8c580e598ea877a2390d77f7b7 100644 (file)
@@ -45,16 +45,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #endif
 #endif
 
-/* Work around a problem that happens because math.h on hpux 7
-   defines two static variables--which, in Emacs, are not really static,
-   because `static' is defined as nothing.  The problem is that they are
-   here, in floatfns.c, and in lread.c.
-   These macros prevent the name conflict.  */
-#if defined (HPUX) && !defined (HPUX8)
-#define _MAXLDBL data_c_maxldbl
-#define _NMAXLDBL data_c_nmaxldbl
-#endif
-
 #include <math.h>
 
 #if !defined (atof)
@@ -1198,7 +1188,7 @@ set_internal (symbol, newval, buf, bindflag)
       int idx = PER_BUFFER_IDX (offset);
       if (idx > 0
          && !bindflag
-         && !let_shadows_buffer_binding_p (symbol))
+         && !let_shadows_buffer_binding_p (XSYMBOL (symbol)))
        SET_PER_BUFFER_VALUE_P (buf, idx, 1);
     }
   else if (BUFFER_LOCAL_VALUEP (valcontents))
@@ -1493,7 +1483,11 @@ The function `default-value' gets the default value and `set-default' sets it.
   if (BUFFER_OBJFWDP (valcontents))
     return variable;
   else if (BUFFER_LOCAL_VALUEP (valcontents))
-    newval = valcontents;
+    {
+      if (XBUFFER_LOCAL_VALUE (valcontents)->check_frame)
+       error ("Symbol %s may not be buffer-local", SDATA (sym->xname));
+      newval = valcontents;
+    }
   else
     {
       if (EQ (valcontents, Qunbound))
@@ -1545,7 +1539,9 @@ Instead, use `add-hook' and specify t for the LOCAL argument.  */)
   sym = indirect_variable (XSYMBOL (variable));
 
   valcontents = sym->value;
-  if (sym->constant || KBOARD_OBJFWDP (valcontents))
+  if (sym->constant || KBOARD_OBJFWDP (valcontents)
+      || (BUFFER_LOCAL_VALUEP (valcontents)
+         && (XBUFFER_LOCAL_VALUE (valcontents)->check_frame)))
     error ("Symbol %s may not be buffer-local", SDATA (sym->xname));
 
   if ((BUFFER_LOCAL_VALUEP (valcontents)
@@ -1676,6 +1672,9 @@ From now on the default value will apply in this buffer.  Return VARIABLE.  */)
 
 /* Lisp functions for creating and removing buffer-local variables.  */
 
+/* Obsolete since 22.2.  NB adjust doc of modify-frame-parameters
+   when/if this is removed.  */
+
 DEFUN ("make-variable-frame-local", Fmake_variable_frame_local, Smake_variable_frame_local,
        1, 1, "vMake Variable Frame Local: ",
        doc: /* Enable VARIABLE to have frame-local bindings.
@@ -1692,7 +1691,9 @@ The only way to create a frame-local binding for VARIABLE in a frame
 is to set the VARIABLE frame parameter of that frame.  See
 `modify-frame-parameters' for how to set frame parameters.
 
-Buffer-local bindings take precedence over frame-local bindings.  */)
+Note that since Emacs 23.1, variables cannot be both buffer-local and
+frame-local any more (buffer-local bindings used to take precedence over
+frame-local bindings).  */)
      (variable)
      register Lisp_Object variable;
 {
@@ -1709,7 +1710,8 @@ Buffer-local bindings take precedence over frame-local bindings.  */)
 
   if (BUFFER_LOCAL_VALUEP (valcontents))
     {
-      XBUFFER_LOCAL_VALUE (valcontents)->check_frame = 1;
+      if (!XBUFFER_LOCAL_VALUE (valcontents)->check_frame)
+       error ("Symbol %s may not be frame-local", SDATA (sym->xname));
       return variable;
     }
 
@@ -3274,15 +3276,7 @@ arith_error (signo)
      must reestablish each time */
   signal (signo, arith_error);
 #endif /* USG */
-#ifdef VMS
-  /* VMS systems are like USG.  */
-  signal (signo, arith_error);
-#endif /* VMS */
-#ifdef BSD4_1
-  sigrelse (SIGFPE);
-#else /* not BSD4_1 */
   sigsetmask (SIGEMPTYMASK);
-#endif /* not BSD4_1 */
 
   SIGNAL_THREAD_CHECK (signo);
   xsignal0 (Qarith_error);